Computer Science, asked by rishi2581, 11 months ago

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 anishasa
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