:

:

̳

ֲ ò

________

___________________

:

.

____ __________ 2007.

____ __________ 2007.

_____________________

ϳ


˳


, . Borland C++ Builder.

, , ( , , , ..) - C++ Builder Borland , , , Developer Studio Microsoft.


C++ Builder 32- Windows 95 Windows NT, OLE 볺-. , . '. C++Builder, . , ' , .

C++Builder : Standard (). Professional ( , ) Client/Server Suite ( 볺/). , , SQL , Internet, , .

, . , C++ Builder , Borland C++ 4.5. , " " Windows , . .

C++ Builder , , ( ) . , , , " " Borland C++ 5.02.

C++ Builder ' 3- :

dBASE Paradox: Sybase, Oracle, InterBase Informix; Excel, Access, FoxPro Btrieve. BDE (Borland Database Engine) ' . Database Explorer ' ' . , dBASE '. "" .

C++ Builder . , , . , .

BORLAND C++ BUILDER :

Borland C++ Builder - Borland , C++, Delphi. C++ Builder , .

C++ Builder

C++ Builder SDI-, , () (). , C++ Builder ' ' () (). ϳ .

cb200000.gif

.1. C++ Builder

C++ Builder. ' C++ Builder, . C++ Builder , . C++ Builder , , .

C++ Builder

() (). ³ ' , . , . ' . , (, , Windows 95 .)

. ' , , .

C++ Builder : , 䳿 .

, ' 䳿, . ' , , ' .

, . , (, ). (Properties). ' (published) . published-, (public), , . ' . '. .

, ', ( , , , ..).

䳿

(Events) ' , ( , , Windows 95 Windows NT 䳿, ' - 䳿). . C++ Builder , , ' 䳿 . 䳿, , .

, , , , ' 䳺, C++ Builder . , , . { ... }. , 䳿. , .

, ' , '. , , : ->, :

Edit1->Show();

³, ' *.h ', ' ' (, ). , , ' .

, - . . , View/Project Manager. ' Project1.cpp.

. . , New Form . , Add , . - . , , ' , , , ' . , Remove .

Options , , , , , ( Delphi 2.0, C++ Builder ) .

C++ Builder , .

, C++ Builder -- , - , , C++ Builder.

++ Builder

C++ Builder . , , . , File/New Application.

C++ Builder ' Project1.cpp, make- ' Project1.mak. , , , C++ Builder .

. :

           .DFM,

           .CPP, C++.

           .H, .

, .

, File/New Form. ' , . File/New, Forms '.

, , Compile Compile. , , , , Run Run. ( , ).

, C++ Builder , , . , , Run Run, . Windows.

:

, , , . File/New Application ' samp1.cpp, ' samp.mak. Button, EditListBox Standard .

ϳ Edit Text. Caption Button1 "".

䳿 OnClick , , ' 䳿 OnClick. ' ' . C++ Builder . ϳ { ... } :

void __fastcall TForm1::Button1Click(TObject *Sender)

{

if (!(Edit1->Text == ""))

{

ListBox1->Items->Add(Edit1->Text);

Edit1->Text = "" ;

}

}

Run Run. - , , , , , .

, . , Caption , ' :

:

void __fastcall TForm1::Button2Click(TObject *Sender)

{

if (!(ListBox1->ItemIndex == -1))

ListBox1->Items->Delete(ListBox1->ItemIndex);

}

:

Close();

, .

, Borland C++ Builder .


C++ Builder, , , , : , , ᑺ.

. ( )

˳. (angl.cpp)

#include <iostream.h>

#include <dos.h>

#include <conio.h>

#include <string.h>

const char numberOfAnswer[] = "\nPress 5 for 50/50, 6 phone friend, 7 walk away.\n\n";

const char numberOfAnswer2[] = "Please enter the number of your choice: ";

const char people1[] = "John";

const char people2[] = "Mary";

const char people3[] = "Paul";

const char people4[] = "Kathy";

const char people5[] = "Greg";

const char people6[] = "Tracy";

const char people7[] = "Peter";

const char people8[] = "Lara";

const char people9[] = "Jason";

const char people0[] = "April";

const char people01[] = "Jeremy";

const char people02[] = "Paula";

const char people03[] = "Chris";

const char people04[] = "Jennifer";

const char people05[] = "Steve";

const char goodAnswer1[] = "\n\nCorrect!\n\n";

const char goodAnswer2[] = "\n\nGreat Job!!\n\n";

const char goodAnswer3[] = "\n\nKeep up the good work!\n\n";

const char goodAnswer4[] = "\n\nThat's right!!\n\n";

const char goodAnswer5[] = "\n\nWonderful answer!!!\n\n";

const char goodAnswer6[] = "\n\nRight!\n\n";

const char goodAnswer7[] = "\n\nYou must have studied. That's the right answer!\n\n";

const char goodAnswer8[] = "\n\nVery good!!!\n\n";

const char goodAnswer9[] = "\n\nYou're absolutely, positively correct!\n\n";

const char goodAnswer0[] = "\n\nWow!!\n\n";

const char goodAnswer01[] = "\n\nExcellent!\n\n";

const char goodAnswer02[] = "\n\nFabulous!\n\n";

const char goodAnswer03[] = "\n\nRight on!\n\n";

const char goodAnswer04[] = "\n\nYou're a genius!\n\n";

const char goodAnswer05[] = "\n\nSplendid!\n\n";

const char badAnswer1[] = "\n\nI'm sorry, that's the wrong answer. :( \n\n";

const char badAnswer2[] = "\n\nNope! That's not it!!!\n\n";

const char badAnswer3[] = "\n\nHahaha. You call that an answer?\n\n";

const char badAnswer4[] = "\n\nWrong.\n\n";

const char badAnswer5[] = "\n\nI'm ashamed of you picking that wrong answer!\n\n";

const char badAnswer6[] = "\n\nCome on! I know you're smarter than that! :( \n\n";

const char badAnswer7[] = "\n\nMaybe you should quit.\n\n";

const char badAnswer8[] = "\n\nWell the good news is there's another question ahead!\n\n";

const char badAnswer9[] = "\n\nI hope you make a better choice next time!\n\n";

const char badAnswer0[] = "\n\nI don't think so.\n\n";

const char badAnswer01[] = "\n\nThat ain't it.\n\n";

const char badAnswer02[] = "\n\nAnother wrong answer.\n\n";

const char badAnswer03[] = "\n\nDon't do this to me! Wrong answer. :( \n\n";

const char badAnswer04[] = "\n\nYou scare me. Wrong!\n\n";

const char badAnswer05[] = "\n\nNo no no! Not that one.\n\n";

const char question1[] = "What color is a dollar bill?\n";

const char question2[] = "If you have 3 quarters, you have...\n";

const char question3[] = "George Washington cut down what kind of tree?\n";

const char question4[] = "If A = B and B = C, then...\n";

const char question5[] = "Complete the phrase: Into the valley rode the...\n";

const char question6[] = "Who always saved Timmy?\n";

const char question7[] = "Who's first gold record was Hard Headed Woman?\n";

const char question8[] = "Who was author of Tom Sawyer and Huckleberry Finn?\n";

const char question9[] = "What was Shirley Temple's real life last name?\n";

const char question0[] = "Who plays the Priest in Anne of Green Gables?\n";

const char question01[] = "If a Sirloin Steak is cooked rare, it is generally what color in the middle?\n";

const char question02[] = "If Coca Cola is applied to an egg shell, the shell turns what color?\n";

const char question03[] = "What is the sum of 30 times 30 plus 90 plus 25?\n";

const char question04[] = "Who is the voice of Bart Simpson?\n";

const char question05[] = "Who was the original Clarke Kent?\n";

int yourAnswer;

int yourAnswer1;

char yourName[128];

int counter = 0;

int counter2 = 0;

int correctAnswers = 0;

unsigned long int score;

int walkAway();

void continueProgram();

int playMillionaire();

int fiftyFiftyUsed;

int phoneFriendUsed;

void answer1();

void answer2();

void answer3();

void answer4();

void answer5();

void answer6();

void answer7();

void answer8();

void answer9();

void answer0();

void answer01();

void answer02();

void answer03();

void answer04();

void answer05();

// Beginning of 50/50 functions

void answer1()

{

clrscr(); // Clears the screen

cout << question1; // Prints question1, defined above, to the screen

cout << " 2. Purple\n";

cout << "3. Green \n";

cout << numberOfAnswer2;

cin >> yourAnswer;

if (yourAnswer == 3)

{

cout << goodAnswer1;

delay(3000);

correctAnswers++; // Increases correctAnswers by one

score = 100; // Sets score to 100

}

if (yourAnswer != 3)

{

cout << badAnswer1;

delay(3000);

score = 0;

walkAway();

}

}

void answer2()

{

clrscr();

cout << question2;

cout << "1. $.75 \n";

cout << " 4. $1.00\n";

cout << numberOfAnswer2;

cin >> yourAnswer;

if (yourAnswer == 1)

{

cout << goodAnswer2;

delay(3000);

correctAnswers++;

score = 200;

}

if (yourAnswer != 1)

{

cout << badAnswer2;

delay(3000);

score = 0;

walkAway();

}

}

void answer3()

{

clrscr();

cout << question3;

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 << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\n";

cout << "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$\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)

{

score = 32000;

walkAway();

return 0;

}

clrscr();

counter++;

cout << "Try for $500000\n\n";

delay(2000);

clrscr();

loop03:

cout << question04;

delay(3000);

cout << "1. Nancy Sinatra 2. Nancy Cartwright\n";

delay(1000);

cout << "3. Nancy Drew 4. Nancy Reagan\n";

cout << numberOfAnswer;

cout << numberOfAnswer2;

cin >> yourAnswer;

if (yourAnswer == 2)

{

cout << goodAnswer04;

delay(3000);

correctAnswers++;

score = 500000;

}

if (yourAnswer == 1 || yourAnswer == 3 || yourAnswer == 4)

{

cout << badAnswer04;

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 loop03;

}

if (fiftyFiftyUsed != 1)

{

fiftyFiftyUsed = 1;

answer04();

if (yourAnswer != 2)

{

score = 32000;

return 0;

}

}

}

if (yourAnswer == 6)

{

if (phoneFriendUsed == 1)

{

cout << "Sorry, phone a friend has been used!\n";

delay(3000);

clrscr();

goto loop03;

}

if (phoneFriendUsed != 1)

{

phoneFriendUsed = 1;

delay(2000);

cout << "Dialing...\n";

delay(2000);

cout << "You have been connected to " << people04 << ".\n";

cout << people04 << ",\n" << question04 << "\n";

cout << "1. Nancy Sinatra 2. Nancy Cartwright\n";

cout << "3. Nancy Drew 4. Nancy Reagan\n";

delay(2000);

cout << "\n\n" << people04 << ": " << "I love that show! It's Nancy Cartwright. 100% sure.\n";

cout << numberOfAnswer2;

cin >> yourAnswer;

if (yourAnswer == 2)

{

cout << goodAnswer04;

delay(3000);

correctAnswers++;

score = 500000;

}

if (yourAnswer != 4)

{

cout << badAnswer04;

delay(3000);

score = 32000;

walkAway();

return 0;

}

if (yourAnswer == 7)

{

score = 32000;

walkAway();

return 0;

}

if (yourAnswer < 1 || yourAnswer > 7)

{

cout << badAnswer04;

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)

{

score = 32000;

walkAway();

return 0;

}

clrscr();

counter++;

cout << "Try for the Grand Prize $1,000,000!!!\n\n";

delay(3000);

clrscr();

loop04:

cout << question05;

delay(3000);

cout << "1. Christopher Reeves 2. Don Adams\n";

delay(1000);

cout << "3. George Reeves 4. Dean Caan\n";

cout << numberOfAnswer;

cout << numberOfAnswer2;

cin >> yourAnswer;

if (yourAnswer == 3)

{

cout << goodAnswer05;

delay(3000);

correctAnswers++;

score = 1000000;

}

if (yourAnswer == 1 || yourAnswer == 2 || yourAnswer == 4)

{

cout << badAnswer05;

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 loop04;

}

if (fiftyFiftyUsed != 1)

{

fiftyFiftyUsed = 1;

answer05();

if (yourAnswer != 3)

{

score = 32000;

return 0;

}

}

}

if (yourAnswer == 6)

{

if (phoneFriendUsed == 1)

{

cout << "Sorry, phone a friend has been used!\n";

delay(3000);

clrscr();

goto loop04;

}

if (phoneFriendUsed != 1)

{

phoneFriendUsed = 1;

delay(2000);

cout << "Dialing...\n";

delay(2000);

cout << "You have been connected to " << people05 << ".\n";

cout << people05 << ",\n" << question05 << "\n";

cout << "1. Christopher Reeves 2. Don Adams\n";

cout << "3. George Reeves 4. Dean Caan\n";

delay(2000);

cout << "\n\n" << people05 << ": " << "I know Christopher Reeves is well known for that. I think it's him. 50% sure.\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();

return 0;

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)

{

score = 32000;

walkAway();

return 0;

}

walkAway();

return 0;

}

int main()

{

clrscr();

cout << "*******************************\n";

cout << "* Who Wants To Be *\n";

cout << "* A *\n";

cout << "* Millionaire?! *\n";

cout << "*******************************\n";

continueProgram();

}


1.

, , . . .


. . C++Builder.

. ³ , .


˳

[1] .., .. . ., 1992. 240 .

[2] . /++. ., 1995. 368 .

[3] . Borland C++. ., 1996. 400 .

[4] .. ++ - . ., 1996. 448 .





2010