Computer Science Canada Quiz |
Author: | Turkz3ar [ Sat Apr 26, 2008 3:53 pm ] |
Post subject: | Quiz |
I have assignment to finish on this monday... I made the quiz but how can i display the result...What is the quiz out of and how many rights they got? Quote: var anykey : char
var answer : string var score : int := 0 loop put "Who won the FIFA 2002 world cup?" put "A: France" put "B: England" put "C : Germany" put "D : Brazil" get answer if answer = "d" or answer = "D" then put "Correct! Good start.```````Press Any Key to Continue```````" score := score + 1 else put "WRONG! HAHAHAHA" end if exit when answer = "a" exit when answer = "c" exit when answer = "b" anykey := getchar cls put "What Team knocked out England in the quater finals of the FIFA 2002 world cup?" put "A: Turkey" put "B: Japan" put "C: Brazil" put "D: Italy" get answer if answer = "c" or answer = "C" then put "Correct! It's getting tough.```````Press Any Key to Continue```````" score := score + 1 else put "WRONG! HAHAHAHA" end if exit when answer = "a" exit when answer = "b" exit when answer = "d" anykey := getchar cls put "What year did England win the world cup?" put "A: 1998" put "B: 1966" put "C: 2006" put "D: 1994" get answer if answer = "b" or answer = "B" then put "Correct! Not Bad.```````Press Any Key to Continue```````" score := score + 1 else put "WRONG! HAHAHAHA" end if exit when answer = "a" exit when answer = "c" exit when answer = "d" anykey := getchar cls put "How many time have Manchester United won the European champions leauge?" put "A: 2" put "B: 6" put "C: 9" put "D: 3" get answer if answer = "a" or answer = "A" then put "Correct! Are you a soccer player or what?.```````Press Any Key to Continue```````" score := score + 1 else put "WRONG! HAHAHAHA" exit when answer = "c" exit when answer = "b" exit when answer = "d" end if anykey := getchar cls put "what team did David Beckham go to after he got sold by manchester united" put "A: Barcelona" put "B: Ajax" put "C: Real Madrid" put "D: Liverpool" get answer if answer = "c" or answer = "C" then put "Correct! PERFECT? You are good soccer boy =)" score := score + 1 else put "WRONG! HAHAHAHA" end if exit when answer = "a" exit when answer = "b" exit when answer = "d" anykey := getchar cls end loop |
Author: | Sean [ Sat Apr 26, 2008 3:59 pm ] | ||
Post subject: | Re: Quiz | ||
Display your score, and have a total number of questions as a variable. Then display like so. |
Author: | Turkz3ar [ Sun Apr 27, 2008 9:20 am ] |
Post subject: | RE:Quiz |
thank u ![]() |
Author: | Sean [ Sun Apr 27, 2008 1:25 pm ] |
Post subject: | RE:Quiz |
No problem, leave any questions here and I'll get to them. |