what will be the output of the following code
int m=2;
int n= 15;
for (int i = 1;i<5;i++){
m++;
--n;
System.out.println (m);
System out println(n);
}
Answers
Answered by
0
Answer:
2
14
3
13
4
12
5
11
Explanation:
4 loop iterations
m has post increment
n has pre decrement
Similar questions
Social Sciences,
5 months ago
Accountancy,
5 months ago
English,
10 months ago
Science,
10 months ago
History,
1 year ago
English,
1 year ago
Math,
1 year ago