मराठी

Analyze the following program segment and determine how many times the loop will be executed. What will be the output of the program segment? - Computer Applications

Advertisements
Advertisements

प्रश्न

Analyze the following program segment and determine how many times the loop will be executed. What will be the output of the program segment?

int k = 1, i = 2; 
while (++i < 6) 
k *= i; 
System.out.println(k);
थोडक्यात उत्तर
एका वाक्यात उत्तर

उत्तर

3 times = 60

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. 4. | पृष्ठ १२३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×