please help me in solving this
Attachments:
Answers
Answered by
4
Required Answer:-
Given C∅de:
int m=2;
int n=15;
for(int i=1;i<=5;i++)
m++;
System.out.print("m is: "+m);
To Find:
- The value of m.
Answer:
- m = 7
Explanation:
- Initially, m = 2
- Here, the for-loop iterates 5 times (from i = 1 to 5).
- After each iteration, value of m is incremented by 1.
- So, value of m is incremented 5 times.
- m = 2 + 5 = 7
- So, the value of m after execution is 7.
Refer to the attachment.
•••♪
Attachments:
Similar questions
English,
1 month ago
Social Sciences,
1 month ago
English,
1 month ago
Science,
3 months ago
India Languages,
3 months ago
Math,
10 months ago
English,
10 months ago
Science,
10 months ago