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
English,
4 months ago
Environmental Sciences,
4 months ago
Physics,
4 months ago
English,
7 months ago
English,
7 months ago
CBSE BOARD X,
1 year ago