English

Give the output of the following program segment: for (int i = 10; i> 6; i = i - 2) System.out.println(i);

Advertisements

Question

Give the output of the following program segment:

for (int i = 10; i> 6; i = i - 2) 
System.out.println(i);

Very Short Answer
Advertisements

Solution

Output:

10
8

shaalaa.com
  Is there an error in this question or solution?
Chapter 7: Statements and their Scope - EXERCISE [Page 164]

APPEARS IN

Dheeraj Mehrotra Computer Science [English] Class 12
Chapter 7 Statements and their Scope
EXERCISE | Q 13. (i) | Page 164
Advertisements
Share
Notifications



      Forgot password?
Use app×