-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwhile_loop.c
More file actions
19 lines (18 loc) · 834 Bytes
/
Copy pathwhile_loop.c
File metadata and controls
19 lines (18 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
//loops 1st while loop
//loop task is 1 to 100 number's print by using C programming lang
void main(){
int a=1, b=100; //integers
while(a <= b){ // while loop started now and take a condiation
printf("This is the While loop %d \n", a); // print the lower value of integer
a++; //A int to increment upto B value is 100, so upto 100 values
}
}
// notes
// * while loop is a most basic loop in C programming. while loop has one control condition,
// It executes as long the condition is true. The condition of the loop is tested before the body of the loop is executed
// C while loops statement allows to repeatedly run the same block of code until a condition is met.
// thank you today learnt a lot bye bye see you later.