Main()
{
Int a=1;
While(a<=100);
{
Print("℅d",a++);
}
}
Answers
Answered by
0
Answer:
1 2 3 4 5 6 7 ................98 99 100
because a<=100
so value true ...loop exist....nd increment
when value of a =101 it is greater than 100 then condition is false ...then it exit
nd nothing is print after 100
Explanation:
1 t0 100 print
while loop is a most basic loop in C programming.
while loop has one control condition, and executes as long the condition is true. The condition of the loop is tested before the body of the loop is executed, hence it is called an entry-controlled loop.
The basic format of while loop statement is:
Syntax:
While (condition)
{
statement(s);
Incrementation;
}
Similar questions