Computer Science, asked by sarah8744, 7 months ago

What will be the output of following
code: int m=2,n=15; for(int i=1;i<5;i++)
m++; --n; System.out.println(m +","
+n);
O 5,14
0 6,11
O 6,14​

Answers

Answered by a321038
0

Answer:

6,11

Explanation:

as the loop will execute four times

for value 1 2 3 and 4

note that 5 becomes equal to 5 which doesn't satisfy the test expression

so m will be incremented 4 times and n will be decremented 4 times

Answered by somalia31
1

Answer:

m is 6

n is 14

hope it helps

Similar questions