write the output of the following code
int T = 9;
for (int n = T; n> 6; n --)
{
int V=T *n+n;
System. out.println ("value=" +V);
}
Answers
Answered by
1
Answer:
Value = 90
Value = 80
Value = 70
int n = 9 ; 9 > 6 True
V = 9 * 9 + 9
V = 90 Printed
Then n-- n value will be decremented by 1
n = 8
8 > 6 True
V = 9 * 8 + 8
V = 80 Printed
Then n-- n value will be decremented by 1
n = 7
7 > 6 True
V = 9 * 7 + 7
V = 70 Printed
Then n-- n value will be decremented by 1
n = 6
6 > 6
Condition false
Similar questions
English,
5 months ago
Social Sciences,
5 months ago
Biology,
5 months ago
English,
11 months ago
Physics,
11 months ago
Business Studies,
1 year ago
Environmental Sciences,
1 year ago