Computer Science, asked by roshnisahajeena2003, 11 months ago

Find the Output and how many times the loop will execute? With explanation....
if(i=5;i>10;i++)
System.out.println(i);
System.out.println(i×4);

Answers

Answered by UnknownDude
8

Hey there, here's your answer.

i has been initialised with the value 5. However, the condition for the loop is that i>10. Since 5>10 is false, the loop will not be executed.

In the next statement, i will be multiplied by 4 and 20 will be displayed.

Output:

20

Similar questions