हिंदी

How many times will the following loop execute? Write the output of the code: int x=10; while(true) { System.out.println(x++*2); if(x%3==0) break; } - Computer Applications

Advertisements
Advertisements

प्रश्न

How many times will the following loop execute? Write the output of the code:

int x=10;
while(true) {
System.out.println(x++*2);
if(x%3==0)
break;
}
एक पंक्ति में उत्तर

उत्तर

Loop is executed two times

20

22

shaalaa.com
Entry Controlled Loop
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2024-2025 (April) Specimen Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×