मराठी

Analyze the Given Program Segment and Answer the Following Questions: (I) Write the Output of the Program Segment. (Ii) How Many Times Does the Body of the Loop Gets Executed?

Advertisements

प्रश्न

Analyze the given program segment and answer the following questions:

(i) Write the output of the program segment.
(ii) How many times does the body of the loop gets executed?

for (int m=5; m<=20;m+=5)
{   if(m%3==0)
   break;
else
if(m%5==0)
System.out.println(m);
continue;
}

थोडक्यात उत्तर
Advertisements

उत्तर

(i)

Output:
5
10
(ii)

3 times

shaalaa.com
Introduction of Nested Loop
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2015-2016 (March)

APPEARS IN

Advertisements
Share
Notifications



      Forgot password?
Use app×