Here is a start to "Who Wants to be a Millionaire":
var questions:array 1..10 of string
var choice1,choice2,choice3,choice4,real_answer:array 1..10 of string
var money_for_question:array 1..10 of int
var lifelinez:array 1..3 of string
var lifeline_used:array 1..3 of boolean
lifelinez(1):="Ask the Audience"
lifelinez(3):="Phone a Friend"
put "Lifelines: "..
put lifelinez", "..
put "Which lifeline do you wish to use: "..
if input="Ask the Audience" and lifeline_used(1)=false then
elsif input="Fifty Fifty" and lifeline_used(2)=false then
elsif input="Phone a Friend" and lifeline_used(3)=false then
put "That is not a lifeline, or it has already been used..."
%Ask the Audience procedure
%Phone a Friend procedure
put "Welcome to Who Wants to be a Millionaire!!"
put "HINT: Type 'lifeline' to use a lifeline."
put "Question: " question (num)
put "a) green ",choice1(num)
put "b) white ",choice2(num)
put "c) blue ",choice3(num)
put "d) brown",choice4(num)
put "Answer: "..
if answer = real_answer (num) then
elsif answer = "lifeline" then
elsif answer not = real_answer(num) then
put "Sorry buddy, you LOSE!"
exit when num>=10
if num=10 then
put "Congratulations! You won ",money," dollars!!"
put "You have lost everything...now go home and cry yourself to sleep!"
Just change the array max values to the number of questions you have...and create the questions, choices, and real answer. Also, create what happens in the lifelines, and how much money you'll get per question. This is a good start to "Who Wants to be a Millionaire!", and i've already answered this too many people, so if you dont understand this, PM me. I wont do your whole project for you, but this is pretty much how it goes. No more having like dozens of people adding me to their msn seeking help.. gr
Seeing as this is being posted on CompSci...multiple people may be using it as their project..so, if your teacher finds like a dozen of you out there with the same project, it is NOT in any way my fault!
Enjoy the code, and put it to good use!s
[Edit] Fixed a couple bugs...should work now