[HELP]"for" loop

Posts 1–5 of 5 · Page 1 of 1
[HELP]"for" loop
ok so this is the code i got atm , its explaining how the "for" thingy works .
but however , is it possible to add something so that the numbers count slower ? now it takes like 1 sec to count em all up .
would be cool if i could make it count +1 each second or something like that .

Code:
#include "stdafx.h"
#include <iostream>
using namespace std;


int main()
{
	int count;
	for (count=1; count <= 100; count++)cout << count << "\n" ;
		system("PAUSE");

	return 0;
}
any one know an easy way to do that ? (still beginner so dont come with to advanced stuff . )
Code:
#include "stdafx.h"
#include <iostream>
#include <windows.h> // for Sleep()
using namespace std;


int main()
{
	int count;
	for (count=1; count <= 100; count++)
        {
              cout << count << "\n" ;
              Sleep(1000); //in milliseconds
        } 
		system("PAUSE");

	return 0;
}
thank you for the help .

/Requesting Close
Not so hard :\
~ solved & closed ~
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?