HELP! multiple choice..
Author |
Message |
pink00rock
|
Posted: Sat Feb 07, 2004 1:37 pm Post subject: HELP! multiple choice.. |
|
|
hii! i'm having trouble creating multiple choice on turing. well it is somewhat easy, its just i have to give the user a 2nd chance if they get it wrong. This is what i have so far.
var answer:string
var counter:int:=0
put "How many months are there in a year?"
put "a) 14"
put "b) 12"
put "c) 7 "
put "Please enter either a,b, or c."
get asnwer
if answer = a or answer = A then
put "CORRECT!"
counter=: counter + 1
end if
put "The number of right answer is, " counter
Thank you so much
Mod Edit: Do post in the right forum next time...
Moved. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
santabruzer
|
Posted: Sat Feb 07, 2004 1:39 pm Post subject: (No subject) |
|
|
wrong place but meh.. here is some help.. enjoy my complex multiple choice program:
Santa's Program!!! |
|
|
|
|
|
santabruzer
|
Posted: Sat Feb 07, 2004 1:41 pm Post subject: (No subject) |
|
|
and here's a mod of your code for you need
code: | var answer : string
var counter : int := 0
for i : 1 .. 2
put "How many months are there in a year?"
put "a) 14"
put "b) 12"
put "c) 7 "
put "Please enter either a,b, or c."
get answer
if answer = "b" or answer = "B" then
put "CORRECT!"
counter := counter + 1
exit
end if
end for
put "The number of right answer is, ", counter
|
|
|
|
|
|
|
.hack
|
Posted: Sat Feb 07, 2004 2:26 pm Post subject: (No subject) |
|
|
u spelt answer wrong on one of the lines. thats prolly ur problemo |
|
|
|
|
|
pink00rock
|
Posted: Sat Feb 07, 2004 3:07 pm Post subject: (No subject) |
|
|
wow, thank you soooooo much! i forgot about that! wow! thanks people! well bye for now.. -take care
p.s sry for posting in the wrong place.. its just that i'm a newbie.. just signed up today lol. thanks! bye |
|
|
|
|
|
|
|