User Tools

Site Tools


cpp:control_structures:do

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cpp:control_structures:do [2012/10/12 02:12] (current)
Line 1: Line 1:
 +{{keywords>wiki library source code example reference}}
 +===== do =====
 +    Syntax 
 +    do instruction while ( condition );
 +===== cpp Sourcecode Example =====
 +<code cpp>
 +#include <iostream> /* including standard library */
 +
 +using namespace std;
 +
 +int main( void ) {
 +int i;
 +    
 +    do
 +        cout << "Hello World no " << i << endl;
 +    while (i++);
 +    
 +return 0;
 +}
 +</code>
 +
 +    output
 +    Hello World no 0
 +    Hello World no 1
 +    Hello World no 2
 +    Hello World no 3
 +    Hello World no 4
 +    Hello World no ...
 +    Hello World no 1579
 +    
 +    and so on
 +
  
advertising
cpp/control_structures/do.txt · Last modified: 2012/10/12 02:12 (external edit)

Impressum Datenschutz