Question: Tracing: Given the code below, show the sequence of lines executed. NOTE: Use + to separate the line numbers (e.g., 1+3+8). -------------------------------------------------------------- Line Code ----

Tracing: Given the code below, show the sequence of lines executed.

NOTE: Use + to separate the line numbers (e.g., 1+3+8).

--------------------------------------------------------------

Line Code

---- --------------------------------

1 int Num = 13;

2 while (--Num >= 10)

{

3 switch (Num % 3)

{

4 case 1: cout << "GOOD";

5 case 2: cout << "BAD";

6 break;

7 default: cout << "UGLY";

8 break;

}//switch

9 Num--;

}//while

10 cout << "DONE";

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!