Computer Science, asked by bhavanihazil, 3 months ago

give the output of the following code fragment
int m=2
int=15
for (int i=1; i=5,i+=2)
m++;--n
System. out.println("m="+m);
System. out.println("n="+n)​

Answers

Answered by Anonymous
1

Explanation:

output:

m=5

n=14

in the loop....only one statement is present....m++ ....so loop will excute 3 times....incresing m 3 times.......so m is 5.....now it will cone out of loop.....and n is decreased by 1.....so n is 14......

and then.... it'll print the values....

Similar questions