while (expression)
{
statement
statement
statement
………
………
}
first the expression is evaluated. if it is true(non zero) then all statements in the body of the while loop are executed. after the execution, cursor return to the expression so again expression is evaluated and if it is found to be true (non zero)again then again the statements in the body of the loop are executed. That is mean these all sentences are executed of the body till the expression is true and when it becomes false(zero), the loop terminates and the control comes out of the loop.
#include<iostream>
int main()
{
int i;
while(i<=100)
{
std::cout<<i;
}
return 0;
}