Home > Back-end > Why the second while loop starts from the score=6?
Why the second while loop starts from the score=6?
Time:09-23
The first to do the final number before the end of the while loop should be 7, Why the second while loop of the first cycle results is 6?
Public class Demo19 { Public static void main (String [] args) { Int score=9; Do { System. The out. Println (score); Score -; } while (score> 6); //a single statement braces can omit { System. The out. Println (" end of the loop "); } While (score<9) { System. The out. Println (score); Score++; } System. The out. Println (" end of the loop "); } }