#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
int minutes,seconds,timeremaining,input=1;
char cAns,cAnswer;
clrscr();
gotoxy(35,15);
printf("Press S to start the game: ");
cAns=getche();
if(cAns=='S'||cAns=='s')
{
clrscr();
printf("\nAre you a human? Y or N: ");
scanf(" %c",&cAnswer);
timeremaining=input;
do
{
input=timeremaining;
minutes=input/60;
input=input-(minutes*60);
seconds=input;
gotoxy(1,1);
printf("%02d:%02d",minutes,seconds);
timeremaining++;
delay(1000);
}while(timeremaining<=90);
if(timeremaining>=90)
{
clrscr();
gotoxy(33,12);
printf("TIME'S UP!!");
getch();
}//if timeremaining==0
}//if cAns=='S'
else
printf("\n\n Please enter a valid choice.");
getch();
}
This is the sample code i'm working on. I have a question and i want to make the timer run the same time the question is displayed. But in this code, the question will show first and when answered, the timer will just start.. hope someone can help. Thanks in advance!