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
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
Chemistry,
2 months ago
Math,
2 months ago
English,
6 months ago
English,
6 months ago
CBSE BOARD X,
11 months ago