while(condition) { statement 1 statement 2 .. .. }
#include <stdio.h> int main() { int x=1; while(x<=10) { printf("%d\n",x); x++; } return 0; }
1
2
3
4
5
6
7
8
9
10
Write a C-program to print 1 to n values using while loop
Write a C-program to print even numbers using while loop
Write a C-program to print even number or odd number based on the n value using while loop
Write a C-program to print even number or odd number based on the n value using single while loop
Write a C-program to count the number of divisible numbers in a given range(1-100) using while loop
Write a C-program to print factorial number using while loop
while(condition) { while(condition) { statement 1 statement 2 } statement 3 statement 4 }
#include <stdio.h> int main() { int x=1,y; while(x<=6) { y=1; while(y<=3) { printf("*"); y++; } printf("\n"); x++; } return 0; }
***
***
***
***
***
***
Write a C-program to print ASCII values of A to Z
Write a C-program to print ASCII values of Numbers