ユーザーが入力した時間間隔で数字を表示するゲームコードを C で書いています。
srand ( time(NULL) ); //this avoids generating the same random number everytime
start:
mySleep(userdelay);
printf("\n\n\a\t%d",rand()%90); //prints random numbers with the time delay entered by the user.
goto start;
したがって、「1を押して一時停止する」などのユーザー入力でこのループを一時停止し、「2を押して再開する」などのユーザー入力で同じループを再開する方法を知りたかっただけです。
事前にサンクス!