cout << " 2. Cherry\n";
cout << " 4. Magnolia\n";
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 2)
{
cout << goodAnswer3;
delay(3000);
correctAnswers++;
score = 300;
}
if (yourAnswer != 2)
{
cout << badAnswer3;
delay(3000);
score = 0;
walkAway();
}
}
void answer4()
{
clrscr();
cout << question1;
cout << "1. A = B + C \n";
cout << " 4. A = C \n";
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 4)
{
cout << goodAnswer4;
delay(3000);
correctAnswers++;
score = 500;
}
if (yourAnswer != 3)
{
cout << badAnswer4;
delay(3000);
score = 0;
walkAway();
}
}
void answer5()
{
clrscr();
cout << question5;
cout << "1. 600 \n";
cout << "3. 300 \n";
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 1)
{
cout << goodAnswer5;
delay(3000);
correctAnswers++;
score = 1000;
}
if (yourAnswer != 1)
{
cout << badAnswer5;
delay(3000);
score = 0;
walkAway();
}
}
void answer6()
{
clrscr();
cout << question6;
cout << "1. Lassie 2. Old Yeller\n";
cout << " \n";
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 1)
{
cout << goodAnswer6;
delay(3000);
correctAnswers++;
score = 2000;
}
if (yourAnswer != 1)
{
cout << badAnswer6;
delay(3000);
score = 1000;
walkAway();
}
}
void answer7()
{
clrscr();
cout << question7;
cout << "1. Jerry Lee Lewis \n";
cout << " 4. Elvis Presley\n";
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 4)
{
cout << goodAnswer7;
delay(3000);
correctAnswers++;
score = 4000;
}
if (yourAnswer != 1)
{
cout << badAnswer7;
delay(3000);
score = 1000;
walkAway();
}
}
void answer8()
{
clrscr();
cout << question8;
cout << " 2. Mark Twain\n";
cout << " 4. Edward Furlong\n";
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 2)
{
cout << goodAnswer8;
delay(3000);
correctAnswers++;
score = 8000;
}
if (yourAnswer != 2)
{
cout << badAnswer8;
delay(3000);
score = 1000;
walkAway();
}
}
void answer9()
{
clrscr();
cout << question9;
cout << "1. Black 2. Temple\n";
cout << " \n";
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 1)
{
cout << goodAnswer9;
delay(3000);
correctAnswers++;
score = 16000;
}
if (yourAnswer != 1)
{
cout << badAnswer9;
delay(3000);
score = 1000;
walkAway();
}
}
void answer0()
{
clrscr();
cout << question0;
cout << "1. Gilbert Blithe \n";
cout << "3. Sedrick Smith \n";
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 3)
{
cout << goodAnswer0;
delay(3000);
correctAnswers++;
score = 32000;
}
if (yourAnswer != 3)
{
cout << badAnswer0;
delay(3000);
score = 1000;
walkAway();
}
}
void answer01()
{
clrscr();
cout << question01;
cout << " 2. Black\n";
cout << "3. Red \n";
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 3)
{
cout << goodAnswer01;
delay(3000);
correctAnswers++;
score = 64000;
}
if (yourAnswer != 3)
{
cout << badAnswer01;
delay(3000);
score = 32000;
walkAway();
}
}
void answer02()
{
clrscr();
cout << question02;
cout << "1. Brown \n";
cout << "3. White \n";
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 1)
{
cout << goodAnswer02;
delay(3000);
correctAnswers++;
score = 125000;
}
if (yourAnswer != 1)
{
cout << badAnswer02;
delay(3000);
score = 32000;
walkAway();
}
}
void answer03()
{
clrscr();
cout << question03;
cout << " \n";
cout << "3. 1025 4. 1015\n";
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 4)
{
cout << goodAnswer03;
delay(3000);
correctAnswers++;
score = 250000;
}
if (yourAnswer != 4)
{
cout << badAnswer03;
delay(3000);
score = 32000;
walkAway();
}
}
void answer04()
{
clrscr();
cout << question04;
cout << " 2. Nancy Cartwright\n";
cout << "3. Nancy Drew \n";
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 2)
{
cout << goodAnswer04;
delay(3000);
correctAnswers++;
score = 500000;
}
if (yourAnswer != 2)
{
cout << badAnswer04;
delay(3000);
score = 32000;
walkAway();
}
}
void answer05()
{
clrscr();
cout << question05;
cout << "1. Christopher Reeves \n";
cout << "3. George Reeves \n";
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 3)
{
cout << goodAnswer05;
delay(3000);
correctAnswers++;
score = 1000000;
}
if (yourAnswer != 3)
{
cout << badAnswer05;
delay(3000);
score = 32000;
walkAway();
}
}
// End of 50/50 functions
int walkAway() // Decides how the program will end
{
delay(3000); // Pauses for 3 seconds
if (correctAnswers >= 1 && correctAnswers < 15)
{
cout << "\n\n" << yourName <<", you answered " << correctAnswers << "\n"; // Prints how many questions answered of
cout << "out of " << counter << " attempted questions.\n"; // how many attempted to the screen
cout << "You've won " << "$" << score << "!";
}
if (correctAnswers < 1) // Executes if correctAnswers is less than 1
{
cout << "\n\nOh well, maybe next time.\n\n"; // Prints to screen
score = 0;
cout << "You won " << "$" << score << ". :( \n\n";
}
if (correctAnswers == 15) // Executes if correctAnswers is equivalent to 10
{
while (counter2 < 10)
{
counter2++;
clrscr();
delay(300);
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
cout << "1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000 1,000,000\n";
delay(300);
clrscr();
delay(300);
counter2++; // Increases counter2 by one
cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$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out << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";
delay(300);
clrscr();
delay(300);
}
cout << "Congradulations, " << yourName << ".\n";
cout << "You've won $1,000,000!!!\n\n";
}
cout << "\n\nTaken from Television Series 'Who Wants To Be A Millionaire'\n"; // Prints to screen
cout << "Programmed by Gordon C. December 2001\n\n"; // in any case
return 0;
}
void continueProgram() // Gives user option to continue or quit
{
delay(5000);
clrscr(); // Clears the screen
cout << "Please enter your FIRST name ONLY: ";
cin >> yourName;
delay(500);
clrscr();
cout << "Hello, " << yourName << ". Welcome to...\n";
delay(2000);
cout << "3. 1025 4. 1015\n";
cout << numberOfAnswer;
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 4)
{
cout << goodAnswer03;
delay(3000);
correctAnswers++;
score = 250000;
}
if (yourAnswer == 1 || yourAnswer == 2 || yourAnswer == 3)
{
cout << badAnswer03;
delay(3000);
score = 32000;
walkAway();
return 0;
}
if (yourAnswer == 5)
{
if (fiftyFiftyUsed == 1)
{
cout << "\nSorry 50/50 has already been used!\n";
delay(3000);
clrscr();
goto loop02;
}
if (fiftyFiftyUsed != 1)
{
fiftyFiftyUsed = 1;
answer03();
if (yourAnswer != 4)
{
score = 32000;
return 0;
}
}
}
if (yourAnswer == 6)
{
if (phoneFriendUsed == 1)
{
cout << "Sorry, phone a friend has been used!\n";
delay(3000);
clrscr();
goto loop02;
}
if (phoneFriendUsed != 1)
{
phoneFriendUsed = 1;
delay(2000);
cout << "Dialing...\n";
delay(2000);
cout << "You have been connected to " << people03 << ".\n";
cout << people03 << ",\n" << question03 << "\n";
cout << "1. 1035 2. 1075\n";
cout << "3. 1025 4. 1015\n";
delay(2000);
cout << "\n\n" << people03 << ": " << "I'm no math expert. I couldn't tell ya. Sorry.\n";
cout << numberOfAnswer2;
cin >> yourAnswer;
if (yourAnswer == 4)
{
cout << goodAnswer03;
delay(3000);
correctAnswers++;
score = 250000;
}
if (yourAnswer != 4)
{
cout << badAnswer03;
delay(3000);
score = 32000;
walkAway();
return 0;
}
if (yourAnswer == 7)
{
score = 32000;
walkAway();
return 0;
}
if (yourAnswer < 1 || yourAnswer > 7)
{
cout << badAnswer03;
delay(3000);
score = 32000;
walkAway();
return 0;
}
}
}
if (yourAnswer == 7)
{
score = 32000;
walkAway();
return 0;
}
if (yourAnswer != 1 && yourAnswer != 2 && yourAnswer != 3 && yourAnswer != 4 && yourAnswer != 5 && yourAnswer != 6 && yourAnswer != 7)