मराठी

What will be the output of the following code? int m = 2; int n = 15; for (int i = 1; i < 5; i++) m++; --n; System.out.println("m = " + m); System.out.println("n = " + n); - Computer Applications

Advertisements
Advertisements

प्रश्न

What will be the output of the following code? 

int m = 2; 
int n = 15; 
for (int i = 1; i < 5; i++) 
m++; 
--n; 
System.out.println("m = " + m); 
System.out.println("n = " + n);
थोडक्यात उत्तर

उत्तर

m = 6

n = 14

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 1.09: Iterative Constructs in Java - EXERCISES [पृष्ठ १२३]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
पाठ 1.09 Iterative Constructs in Java
EXERCISES | Q III. 3. | पृष्ठ १२३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×