HELP: debugging

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
algebra:
int n;
int algebranswer, algebranswer1, algebranswer2, algebranswer3, algebranswer4, algebranswer5, algebranswer6, algebranswer7, algebranswer8, algebranswer9, algebranswer10;
for (n=60; n>0; n--){
wait (1);

  p("QUESTION 1: The sum of five consecutive integers is 5. What is the product of the five integers?\n");
  s("%d", &algebranswer);
  if(algebranswer==0)
    p("CORRECT!\n");
  p("QUESTION 2:If (x^2 - y^2) = 10 and (x + y) = 2, find x.");
  s("%d", &algebranswer1);
if(algebranswer==1.5)//this is only a copied question, nvm if it's wrong
    p("CORRECT!\n");
}
p("END\n");
getch();
return 0;

---> This is only a prog. slice :)

The user must solve the entirety of questions with a limit of 60 secs. What I'm trying to achieve is to inform the user about the time left every 10 seconds. For example : The time left is 50 seconds... but the question must not appear again if the user entered an answer...Any suggestions?
Last edited on
Topic archived. No new replies allowed.