Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding!
#1
How can i get the program to add a number to another figure when i reach a certain point.

For example

If i made a quiz where the contestant gets 3 points for a correct answer how would i add that 3 points to his total. He has an option to view his stats and i want the points to add to his total points in his stats.

HELP!!!

Tom
Reply
#2
maybe by intializing a variable TOTAL to zero, e.g.,

TOTAL = 0

and then in your loop (or whatever) doing something like

TOTAL = TOTAL + POINTS

(Why do I have a sinking feeling that I totally misunderstood your question?)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#3
does it check if he got the right answer directly after the question?
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#4
like this

Code:
Contestant1.points  = 0

INPUT " Question 1, Do I rule? ", question1$

IF question1$ = "yes" THEN

Contestant1.points  = Contestant1.points  + 1

ELSE

Contestant1.points  = Contestant1.points - 1

In the last line, you could just have Contestant1.points = Contestant1.points , which would mean you don't lose any points.

Was that your question ?
LA BLA BLA
Reply
#5
That was exactly wot i wanted!!!

thanks. il giv it a try!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)