हिंदी

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

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);
संक्षेप में उत्तर
एक पंक्ति में उत्तर
Advertisements

उत्तर

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×