|
-
May 20th, 2002, 11:09 AM
#1
Thread Starter
Hyperactive Member
Hi.. Long Time No Seen!!!
It's been a while since my last post here!!
anyways, i'm trying to create a "Press any key to continue" in my code...
for example, i have to display 100 numbers.. each time the counter gets to 24, i should display the message, so the user gets to read the result... i think getch() is the way to do it, but i'm not sure about the exact code???
Please, help!! Thanx...
Here's the code i'm using by the way (the "Press..." only displays after the user presses a key.. starng, ha??!!):
Code:
#include <iostream.h>
#include <conio.h>
void main()
{
for (int i = 1; i <= 100; i++)
{
cout<<i<<endl;
if (i % 24 == 0)
{
cout<<"Press any key to continue";
getch();
}
}
}
"And Now I'm Lika Major Threat, Cause I Remind U Of The Things U Were Made To Forget!" - (2PAC)
"Now They Label Me a Lunatic, Couldn't Care Less, Death or Success is What I Quest, Cause I'm Fearless!" - (2PAC)
" There's a light at the end of every tunnel, just pray it's not a train!! "
I am 100% addicted to Tupac. What about you?
I am 24% addicted to Counterstrike. What about you?
The #1 Tupac Fans Web Site | The Official Tupac Web Site
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|