While Loop in C language

 While Loop in C language 

# While Loop in C language :-While Loop is conditional control loop. It perform a particular task again & again , while a particular condition is true. It is a pretested loop because 1st of all , it test the condition , if condition is true then perform a particular task.


Syntex of while loop:

while (condition )

{

// set of  statement

}

Example:-

Program:- print hi i am sonu.

#include<stdio.h>
#include<conio.h>
void main()
{
int i=1;
clrscr();
while (i<=5)
{
printf(" Hi i am sonu\n");
i++;
}
getch();
}

Output:-

 Hi i am sonu

 Hi i am sonu

 Hi i am sonu

 Hi i am sonu 

Hi i am sonu

Thank you for reading..........

read more :https://www.youtube.com/@Khoobstudy/videos

No comments

Powered by Blogger.