
-----------------------------------
recyclebin123
Thu Mar 24, 2005 10:40 pm

need fixing
-----------------------------------
here is my program ...the problem in here is that when i type in "b" for the menu part it doesnt go to the answers instead it just ends the program..plz help..o and can some1 help me on the last part which is if I type "c" the program should exit , dun no how to do that either:(


var font1, font2 : int
font1 := Font.New ("sans serif:18:bold")
font2 := Font.New ("serif:12")
var choice1 : string

    Font.Draw ("Please Choose One of the Following By", 10, 300, font1, black)
    Font.Draw ("Typeing a, b or c", 10, 250, font1, black)
    Font.Draw ("a.) QUIZ", 10, 200, font2, black)
    Font.Draw ("b.) ANSWERS", 10, 180, font2, black)
    Font.Draw ("c.) QUIT", 10, 160, font2, black)
    get choice1
    if choice1 = "a" then
        cls
var guess : string
var count : int := 0
put "Please answer with capital letters for first letter"
put "You get THREE trys for each question\n\n"

put "What is the capital of Ontario?"
for i : 0 .. 2
    get guess : *
    if guess = "Toronto" then
        put "yup!"
        count += 3 - i
        exit
    end if
    put "\nnope, try again"
end for

put "\nWhat is the capital of Quebec?"
for i : 0 .. 2
    get guess : *
    if guess = "Quebec City" then
        put "yup!"
        count += 3 - i
        exit
    end if
    put "\nnope, try again"
end for

put "\nWhat is the capital of British Columbia"
for i : 0 .. 2
    get guess : *
    if guess = "Victoria" then
        put "yup"
        count += 3 - i
        exit
    end if
    put "\nnope, try again"
end for

put "\nWhat is the capital of Alberta"
for i : 0 .. 2
    get guess : *
    if guess = "Edmonton" then
        put "yup"
        count += 3 - i
        exit
    end if
    put "\nnope, try again"
end for

put "\nWhat is the capital of Saskatchewan"
for i : 0 .. 2
    get guess : *
    if guess = "Regina" then
        put "yup"
        count += 3 - i
        exit
    end if
    put "\nnope, try again"
end for

put "\nWhat is the capital of Manitoba"
for i : 0 .. 2
    get guess : *
    if guess = "Winnipeg" then
        put "yup"
        count += 3 - i
        exit
    end if
    put "\nnope, try again"
end for

put "\nWhat is the capital of NewFoundLand and Labrador"
for i : 0 .. 2
    get guess : *
    if guess = "St John's" then
        put "yup"
        count += 3 - i
        exit
    end if
    put "\nnope, try again"
end for

put "\nWhat is the capital of New Brunswick"
for i : 0 .. 2
    get guess : *
    if guess = "Fredericton" then
        put "yup"
        count += 3 - i
        exit
    end if
    put "\nnope, try again"
end for

put "\nWhat is the capital of Nova Scotia"
for i : 0 .. 2
    get guess : *
    if guess = "Halifax" then
        put "yup"
        count += 3 - i
        exit
    end if
    put "\nnope, try again"
end for
put "\nyour score is ", count
if count