Search C Program

Print 1 to 10 using while loop

/* print 1 to 10 using while loop */

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

Related Post
Print 1 to 10 using for loop
http://cbasicprogram.blogspot.in/2012/02/print-1-to-10-using-for-loop.html

2 comments: