Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how do for loops on c++

for ( init; condition; increment ) {
   statement(s);
}

Example:

for ( i=0; i<5; i++ ) {
   cout<<"Hello World"<<endl; //Hello World is going to be print out 5 times
}
Source by fr.wikibooks.org #
 
PREVIOUS NEXT
Tagged: #loops
ADD COMMENT
Topic
Name
8+7 =