State the number of times the following loop will run and the output of it
int m=75:
do
if(m<10) break;
m-=10;} while(true);
System.out.println(m):
Answers
Answered by
1
Explanation:
the condition is satisfied so m enters the loop
OUTPUT
65
55
45
35
25
15
5
5
thus the loop is executed 8 times
extra 5 is printed because when 5 enters the loop the loop breaks due to break command but gets printed because of println statement
Similar questions