Give the output of the following program segment: for (i = 5; i <8; i--) System.out.println(i + 1);
Advertisements
Question
Give the output of the following program segment:
for (i = 5; i <8; i--)System.out.println(i + 1);
Very Short Answer
Advertisements
Solution
Output:
6
5
4
3
2
1
0
-1 ...
shaalaa.com
Is there an error in this question or solution?
Chapter 7: Statements and their Scope - EXERCISE [Page 164]
