Computer Science, asked by rajath888, 1 year ago

PREDICT THE OUTPUT
int m= 20; n = 25;
for(int i=1;i<5;i++)
m++;
--n;
system.out.println("m=",+m);
system.out.println("n="+n);

Answers

Answered by Vaanika
4
m=24
n=24
the loop will run 4 times and as there are no braces in loop only 1 condition will execute 4 times (m++) and condition of n-- will execute when control will come out of loop



hope this helps .........
plz mark brainliest ...

rajath888: i have sme 5 question
Vaanika: ask them I'll try and plz mark brainliest
Vaanika: u can message me if u want
rajath888: ok
rajath888: i posted a question plz answer
Vaanika: plz mark brainliest
Vaanika: thanks for brainliest
rajath888: np
rajath888: frm were r u??
Vaanika: come inbox
Similar questions