Given this code fragment:
1 double x = 2.1;23 while (x * x <= 50)4 {5 switch ((int) x)6 {7 case 6:8 x--;9 System.out.println(“case 6, x= “ + x) ;10 case 5:11 System.out. println(“case 5, x = “ + x) ;12 case 4:13 System.out.println(“case 4, x= “ + x) ;14 break;15 default:16 System.out.println(“something else, x = " + x) ;17 } // end switch18 x +=2;19 } // end whileTrace the code using either the short form or the long form. To help you get started, here’s the trace setup. For the short form, you won’t need the line# column.
line# | X | output |
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.