so far I have this. how do I make it stop by pressing the space bar?
#include<iostream>
#include<cstdlib>
#include<windows.h>
using namespace std;
int main()
{
int ms,s,m,st;
system("pause");
for(m=0;m<=59;m++)
{
for(st=0;st<=5;st++)
{
for(s=0;s<=9;s++)
{
for(ms=0;ms<=9;ms++)
{
Sleep(50);
system("cls");
cout<<"\n\n\n\n\t\t\t\t"<<m<<":"<<st<<s<<":"<<ms<<endl;
}
}
}
}
return 0;
}
EDIT: I just had an idea, should I use a logic operator and a function to stop it?, but how would I do that?
This post has been edited by Vixthefox: 21 November 2009 - 03:10 PM

New Topic/Question
Reply




MultiQuote






|