find the output of :int b=10; do { system out println (b); b--; } while (b>0);
Answers
Answered by
0
Answer:
Output:
10
9
8
7
6
5
4
3
2
1
I hope you find it useful... If you have any query do comment, I will try to solve it...
Answered by
0
Answer:
output will be
10
9
8
7
6
5
4
3
2
1
Explanation:
here in do-while loop, the loop will iterate until the given condition (i.e. b>0) becomes false. so at last when 1 is printed ...the b is decremented and becomes 0 so while passing to while condition becomes false as b=0 and the loop will break then.
Similar questions