adsense

Hii, welcome to my site. My name is Om prakash kartik. This blog helps you to learn programming languages concepts.

Write a program to print 1 to 100 numbers using while loop

Write a program to print 1 to 100 numbers using while loop.

#include<stdio.h>
#include<conio.h>
#include<math.h>
  int main()
     {
      int i;
      i=1;
      while(i<=100)
       {
        if(i%10==0)
          printf("%4d\n",i);
        else
          printf("%4d",i);
         i++;
 }
     getch();
     }

 Output:

             

Post a Comment

0 Comments