Explain the While Statement - Computer Programming?
A 'while statement' is an entry controlled loop statement. When the expression is calculated and the condition is not satisfied, it won't allow executing the statements inside the loop and if condition is true, then statements get executed. It checks the condition continually until the condition goes false and once false condition occurs the control is transferred to out side of the loop.
The universal form of while statements is
while(expression)
{
statements;
}
instance:
while(x<5)
{
x=x+5;
}