while is a looping statement. it used to execute the same task until reach the condition false. it is a enter checkup statement.which means conditions can check before loop execution.
syntax
while([condition])
{
//statements or block of code.
}
example,
main()
{
int a=1;
while(a<=10)
{
printf("\n %d",a);
a++;
}
}
Comments
Post a Comment