English

Give the output of the following program segment: int n = 4279; int d; while(n>0) (d=n%10; System.out.println(d); n=n/100; }

Advertisements
Advertisements

Question

Give the output of the following program segment:

int n = 4279; int d;
while(n>0)
(d=n%10;
System.out.println(d);
n=n/100;
}
Very Short Answer
Advertisements

Solution

9

2

shaalaa.com
  Is there an error in this question or solution?
Chapter 1: Revision of Class 9 Syllabus - Exercises [Page 49]

APPEARS IN

Rupa Pandit Computer Applications [English] Class 10 ICSE
Chapter 1 Revision of Class 9 Syllabus
Exercises | Q 11. | Page 49
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×