C program to display first 10 natural numbers using for loop

 

C program to display first 10 natural numbers using for loop



/**************************************************

 C program to demonstrates for loop in C language

  **************************************************/

 #include<stdio.h>

 void main()

 {

     printf("** OUTPUT**\n");

     printf("First 10 natural numbers are\n");

     for(int i=1;i<=10;i++)

     {

     printf("%d\t\n",i);

     }

     printf("End of program");

 }

** OUTPUT**

First 10 natural numbers are

1

2

3

4

5

6

7

8

9

10

End of program

टिप्पणी पोस्ट करा

0 टिप्पण्या