int i;
for(i=1;i<=10;i++) {
printf("%d\n",i);
}
}
Output:
1
2
3
4
5
6
7
8
9
10
}
}
Output:
1
2
3
4
5
6
7
8
9
10
How it works
Runs a loop from 1 to 10 by adding 1 on each current loop value.
Example:
1
1+1 = 2
2 + 1 = 3
....
9 + 1 = 10