Computer Science, asked by roshnisahajeena2003, 11 months ago

Find the output and how many times the loop will execute.
int i;
for(i=5;i>10;i++)
System.out.println(i);
System.out.println(i*4);
explain it also....​

Answers

Answered by harshit23619
4

Explanation:

IN THE FIRST EXECUTION ORIGINAL VALUE OF I WILL BE PRINTED

AND THEN IT WILL BE Multiplied BY 4 AND THEN IT WILL BE PRINTED

THE LOOP WILL RUN ONCE MORE WITH THE VALUE OF I AS 6 WILL BE PRINTED

AND ITS VALUE WHEN MULTIPLIED WITH 4

THIS PROCESS WILL CONTINUE TILL THE END OF LOON THAT IS 10

AND THE LOOP WILL BE RUNNING 5 TIMES

ANSWER

5

20

6

24

7

28

8

32

9

36

Similar questions