![]() |
| |||||||
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Senior Member | This tutorial will show you how to loop statements in c++, you should know basic c++ before trying this Definition: A loop is a way of repeating a statement a number of times until some way of ending the loop occurs. It might be run for a preset number of times, typically in a for loop, repeated as long as an expression is true (a while loop) or repeated until an expression becomes false in a do while loop. There are three types of loops -Do-While -While -For All three have their importance and uses. A do-while loop is used to run the loop once and then check conditions A while loop checks the conditions before the loop is executed and decides if the loop needs to be run A for loop is an increment counter used for a specific amount of outputs All three loops are in this code: [codebox]#include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { cout ![]()
__________________ Someday I'm gonna write a song thats gonna be so popular, everybody hates it ![]() If you guys could help me out with this it would be awesome! http://www.FlashiPods4free.com/index.php?ref=38639 |
| | |
| | #2 (permalink) |
| Junior Member Join Date: Dec 2007
Posts: 28
Reputation: 0 ![]() | Nice Tutorial... Keeps it short and to the point.
__________________ http://adbux.org/?r=h121h http://buxa.in/?r=h121h http://bux.to/?r=h121h http://paid.vg/?r=h121h http://www.titanclicks.com/signup.php?ref=h121h Quick Cash! |
| | |
| | #5 (permalink) |
| Junior Member Join Date: Dec 2007
Posts: 28
Reputation: 0 ![]() | What do you not get about nested loops? Maybe I can explain...
__________________ http://adbux.org/?r=h121h http://buxa.in/?r=h121h http://bux.to/?r=h121h http://paid.vg/?r=h121h http://www.titanclicks.com/signup.php?ref=h121h Quick Cash! |
| | |
| | #6 (permalink) | |
| Junior Member Join Date: Dec 2007
Posts: 9
Reputation: 0 ![]() | Nested loops: do something until condition is met, usually do something else, repeat. I prefer to just: <div class='quotetop'>QUOTE </div> Quote:
FlyingIsFun1217 | |
| | |