Code:
int n;
for(n=30; n>=10; n=n-5)
printf(“%d\n”, n);
This for
loop starts with n = 30
and decreases n
by 5 until n
is less than 10. The loop will print the value of n
on each iteration.
Output:
30
25
20
15
10
FreeNotes
Code:
int n;
for(n=30; n>=10; n=n-5)
printf(“%d\n”, n);
This for
loop starts with n = 30
and decreases n
by 5 until n
is less than 10. The loop will print the value of n
on each iteration.
Output:
30
25
20
15
10