Print numbers from 1 to 10 using while loop Program in C
/*Program to print numbers from 1 to 10 using while loop*/
#include<stdio.h>
int main(void)
{
int i=1;
while(i<=10)
{
printf("%d\n",i);
i = i+1; /*Statement that changes the value of condition*/
}
printf("\n");
return 0;
}
Output:
1 2 3 4 5 6 7 8 9 10c language tutorial learn c language study c language