Write a program to display the first 10 natural numbers in C Programming

Write a program to display the first 10 natural numbers in C Programming

Q:-Write a program to display the first 10 natural numbers in C Programming

#include<stdio.h>
#include<conio.h>
void main() 
 {
    int i;

    printf("The first 10 natural numbers are:\n");

    for(i = 1; i <= 10; i++) {
        printf("%d ", i);
    }

    printf("\n");

    getch();
}

Output

TOP