C++
do while
A do...while loop is similar to a while loop, except that a do...while loop is guaranteed to execute at least one time.
Syntax:do
{
statement(s);
}while( condition );
Example:#include
using namespace std;
int main ()
{
// Local variable declaration:
int a = 10;
// do loop execution
do
{
cout << "value of a: " << a << endl;
a = a + 1;
}while( a < 20 );
return 0;
}
Content
License.
All information of this service is derived from the free sources and is provided solely in the form of quotations.
This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 574 / 158776877. Delta: 0.00195 с