Question: (2) (4 Points) What is printed on the screen when the following code is executed? Briefly show your work. int x = 20; int

(2) (4 Points) What is printed on the screen when the following

 

(2) (4 Points) What is printed on the screen when the following code is executed? Briefly show your work. int x = 20; int total = 0; while (x >= 1) { if (x % 5 == 0 ) total x = x-1; } total + x%3B "I System.out.println(" X is "+x+" and total is +total);

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 Programming Questions!