C Language program to print numbers from 1 to 10 using for loop


Following program shows you how to print numbers from 1 to 10 using for loop.

#include <stdio.h>
int main(void) {
	int input;
	for (int input = 1; input <= 10; input++) {
		printf("%d \n", input);
	}
}



Output:

1 
2 
3 
4 
5 
6 
7 
8 
9 
10