WAP to print first ten natural numbers using "While Loop"

//WAP to print first ten natural numbers using "While Loop"//


#include<stdio.h>
#include<conio.h>
void main()
{
 int i;
 i=1;
 while (i<=10)
 {
  printf("%d\n", i);
 }
 getch();
}


  • The Input and Output of this program is shown in the pictures below:-                                                                                                                                                                                                                                  INPUT                                                                                                                     
                                                                                                                                                                                                                                                                                                                                              OUTPUT                                                                                                                                         
                                                                                                                         

                                                                                                                                                                                                                                 

Comments