Quote:
Originally Posted by plnyyanks
Try something like this:
Code:
//make sure you #include <iostream>
int count = 0; //variable to store count
while(count < 10){ //this will only run 10 times
system("pause"); //wait for user to press enter - this will send the Windows shell command "pause", and wait for the user to press enter
count++; //increment count
cout << "Count: " << count << endl; //show count to user
}
You'll need a variable to store the running count, and after the user presses enter, it'll have to be incremented. Does that snippet make sense logically?
|
Trust Phil. He knows this stuff.
