Skip to content

Commit 33b27b6

Browse files
committed
while loop syntax
1 parent 604b5e2 commit 33b27b6

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed
File renamed without changes.

lecture_3/lecture_3

-104 Bytes
Binary file not shown.

lecture_3/while.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//while loop is an entry control loop
2+
/*
3+
intialization
4+
while(Termination condition){
5+
statements
6+
7+
update expression comes here ,
8+
}
9+
*/
10+
// program to print 1 to 10
11+
#include <stdio.h>
12+
void main(){
13+
int i =1 ;
14+
while(i<=10){
15+
printf("%d \n",i);
16+
i++;
17+
}
18+
}

0 commit comments

Comments
 (0)