500 likes | 627 Views
MACHINE PROJECT CS10L/B13. Submitted by: Bugayong, Capellamaeye S. Gresola, Camille C. Moreno, Jeannie Lou H. Queado,Princess Rachell Norielynn P. I. Machine Program Statement. “WHO WANTS TO BE A MILLIONARE GAME”. II. Objective/s.
E N D
MACHINE PROJECTCS10L/B13 Submitted by: Bugayong, Capellamaeye S. Gresola, Camille C. Moreno, Jeannie Lou H. Queado,Princess Rachell Norielynn P.
I. Machine Program Statement “WHO WANTS TO BE A MILLIONARE GAME”
II. Objective/s • 1. To give facts and learning’s to the players. • 2. To have something to enjoy during free time that • could relieve stress. • 3. To make this game as a substitute of a variety show. • 4. To make it prominent to the people.
//WHO WANTS TO BE A MILLIONARE GAME// #include<iostream> #include<cstdlib> #include<ctime> #include<cstring> using namespace std; void game(); void midgame(int); void inter(int); void inter2(int); void exit(); int main() { char choice; cout<<"### ### ###"<<endl; cout<<" ### ## ### HO WANTS TO BE A MILLIONARE (PINOY VERSION)"<<endl; cout<<" ################"<<endl<<endl; cout<<"ang paglalaro ay madali lng. pindutin lng ang letra ng tamang sagot\n“ <<"ikaw ay merong 3 50-50 na kung saan ay magiging dalawa na lang ang iyong pagpipilian\n"; cout<<"handa ka na ba?!\n"; cout<<"pindutin lng ang [y] kung oo at [n] kung hindi\n"; cin>>choice; if (choice=='y') { game();
} else if (choice=='n') { cout<<"bye"<<endl; exit(1); } else cout<<"invalid ang iyong sagot\n"; exit(1); return 0; } void game() { int money,help; char ans,choice; int number = 0, number2 = 1; const int MAX = 2, MIN = 1; srand(time(NULL)); number = (rand() % (MAX - MIN +1))+MIN; money=0; help=3; system("PAUSE"); system("CLS"); cout<<"press mo lng ang [p] pra sa 50-50\n"; cout<<"easy questions muna tau\n\n" <<"Unang tanong\n"; //1st question1000// if (number==number2) {
cout<<"Sino ang presidente nahalal noong 1965?\n" <<"a) Marcos\t\tc) Arroyo\n" <<"b) Aquino\t\td) Estrada\n"; do { cin>>ans; if (ans=='a') { cout<<"you are correct"<<endl; money=money+1000; } else if((ans=='c')||(ans=='b')||(ans=='d')) { cout<<"you are wrong"<<endl; money=money+0; exit(); } else if(ans=='p') { cout<<"the choices now are: a & c\n"; help=help-1; } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); if ((ans=='c')||(ans=='b')||(ans=='d')) { cout<<"game over\n" <<"wla kang perang maiuuwi.";
exit(); } } else { cout<<"Ano ang ginagamit sa panligo?" <<"\na) sipilyo\t\tc) sabon" <<"\nb) kutsara\t\td) lagari"<<endl; do { cin>>ans; if (ans=='c') { cout<<"you are correct"<<endl; money=money+1000; } else if((ans=='a')||(ans=='b')||(ans=='d')) { cout<<"game over"<<endl; money=money+0; exit(); } else if(ans=='p') { cout<<"the choices now are: c & d\n"; help=help-1; } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); }
cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pangalawang tanong\n"; //2nd question1000// cout<<"Ano ang ginagamit kapag mapurol ang lapis?" <<"\na) tsinelas\t\tc) panghasa" <<"\nb) pantasa\t\td) wla sa choices"<<endl; do { cin>>ans; if (ans=='b') { cout<<"you are correct"<<endl; money=money+1000; } else if((ans=='a')||(ans=='c')||(ans=='d')) { cout<<"game over"<<endl; money=money+0; exit(); } else if(ans=='p') { cout<<"the choices now are: b & c\n"; help=help-1; }
else if(ans=='p') { cout<<"the choices now are: b & c\n"; help=help-1; } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pangatlong tanong\n"; //3rd question1000// if (number==number2) { cout<<"kung ikaw ay teacher anu ang ginagawa mo?" <<"\na) nagbebenta\t\tc) naglilinis“ <<"\nb) nagtuturo\t\td) wla sa choices"<<endl; do { cin>>ans; if (ans=='b') { cout<<"you are correct"<<endl; money=money+1000; }
else if((ans=='a')||(ans=='c')||(ans=='d')) { cout<<"game over"<<endl; money=money+0; exit(); } else if(ans=='p') { if (help<=0) { cout<<"wala ka nang natitirang 50-50\n"; } else cout<<"the choices now are: b & c\n"; help=help-1; } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } else { cout<<"ano ang pinakamataas na bundok dito sa pilipinas\n" <<"a) Everest\t\tc) Mayon\n" <<"b) Pinatubo\t\td) Apo\n"<<endl; do { cin>>ans; if (ans=='d') { cout<<"you are correct"<<endl; money=money+1000;
} else if((ans=='a')||(ans=='c')||(ans=='b')) { cout<<"game over"<<endl; money=money+0; exit(); } else if(ans=='p') { if (help<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); } else if(choice=='y') ans='o'; }while(choice!='t'&&choice!='y'); else { cout<<"the choices now are: a & d\n";
help=help-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pangapat na tanong\n"; //4th question2000// cout<<"ayon sa kasabihan, anu daw ang meron pag may tiyaga?" <<"\na) nilaga\t c) tubig" <<"\nb) lupa\t\t d) ulan"<<endl; do { cin>>ans; if (ans=='a') { cout<<"you are correct"<<endl;
money=money+2000; } else if((ans=='b')||(ans=='c')||(ans=='d')) { cout<<"game over"<<endl; money=money+0; exit(); } else if(ans=='p') { if (help<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); } else if(choice=='y') ans='o'; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: a & c\n";
help=help-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"ikalimang tanong\n" //5th question// <<"ito ang huling tanong para sa Easy round\n"; if (number!=number2) { cout<<"ano ang pambansang hayop ng pilipinas?" <<"\na) kabayo\t\tc) kalabaw" <<"\nb) baboy\t\td) tamaraw"<<endl; do { cin>>ans; if (ans=='c') { cout<<"you are correct"<<endl; money=money+5000; } else if((ans=='a')||(ans=='b')||(ans=='d')) { cout<<"game over"<<endl; money=money+0; exit(); }
} else if(ans=='p') if (help<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); } else if(choice=='y') ans='o'; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: a & c\n"; help=help-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } else {
cout<<"ano ang unang sakramento na tatanggapin mo kung ikaw ay kristyano?" <<"\na) binyag\t\tc) kasal" <<"\nb) kumpil\t\td) wala sa pagpipilian"<<endl; do { cin>>ans; if (ans=='a') { cout<<"you are correct"<<endl; money=money+5000; } else if((ans=='c')||(ans=='b')||(ans=='d')) { cout<<"game over"<<endl; money=money+0; exit(); } else if(ans=='p') { if (help<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money;
exit(); } else if(choice=='y') ans='o'; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: a & c\n"; help=help-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"congratulations!! kahit ikaw ay magkamali, ikaw ay maguuwi ng 10000\n" <<"pumunta na tau sa next category\n" <<"ito ay medium round\n";midgame(help); return; } void midgame(int help2) { char ans,choice; int money; int number = 0, number2 = 1; const int MAX = 2, MIN = 1; srand(time(NULL));
number = (rand() % (MAX - MIN +1))+MIN; money=10000; cout<<"Meron ka pang "<<help2<<" help\n" <<"unang tanong\n"; system("PAUSE"); system("CLS"); if(number!=number2)//1st question// { cout<<"kung ang relihiyon mo ay islam, anu ang hayop na hindi ninyo kinakain?\n" <<"a) baka\t\tc) manok\n"<<"b) baboy\td) kambing\n"; do { cin>>ans; if (ans=='b') { cout<<"you are correct"<<endl; money=money+10000; } else if((ans=='a')||(ans=='c')||(ans=='d')) { cout<<"game over"<<endl; money=10000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help2<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n"
<<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); } else if(choice=='y') ans='o'; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: a & c\n"; help2=help2-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } else { cout<<"kung ang biology ay pagaaral ng buhay, anu naman ang pagaaral ng mundo?\n" <<"a) chemistry\t\tc) pathology\n" <<"b) sociology\t\td) geology\n"; do {
cin>>ans; if (ans=='d') { cout<<"you are correct"<<endl; money=money+10000; } else if((ans=='a')||(ans=='c')||(ans=='b')) { cout<<"game over"<<endl; money=10000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help2<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit();
} else if(choice=='y')ans='o'; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: a & d\n"; help2=help2-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pangalawang tanong\n\n"; //2ndquestion// if (number!=number2) { cout<<"saan ginuhit ni Juan luna ang Spolaruim na nananlo ng gold prize noong 1884" <<"\na) Madrid\t\tc) Maynila" <<"\nb) Alemanya\t\td) China"; do { cin>>ans; if (ans=='a') { cout<<"you are correct"<<endl;
money=money+10000; } else if((ans=='b')||(ans=='c')||(ans=='d')) { cout<<"game over"<<endl; money=10000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help2<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { Cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); else if(choice=='y') ans='o'; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: a & c\n"; help2=help2-1; }
} else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } else { cout<<"alin sa mga sumusnunod ang hindi isinulat ni rizal?\n" <<"a) Sa Aking Mga Kababata \t\tc) Ang huling panghimakas" <<"\nb) Fray Botod\\td) Noli Me Tangere\n"; do { cin>>ans; if (ans=='b') { cout<<"you are correct"<<endl; money=money+10000; } else if((ans=='b')||(ans=='c')||(ans=='d')) { cout<<"game over"<<endl; money=10000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help2<=0) {
cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); } else if(choice=='y') ans='o'; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: a & b\n"; help2=help2-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pangatlong tanong\n\n"; //3rd question// if(number==number2) {
cout<<"sino ang sumulat ng macbeth\n" <<"a) Edgar Allan Poe\t\tc) Shakespeare"<<"\nb) Dante\t\td) Confucius"; do { cin>>ans; if (ans=='c') { cout<<"you are correct"<<endl; money=money+10000; } else if((ans=='b')||(ans=='a')||(ans=='d')) { cout<<"game over"<<endl; money=10000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help2<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); }
else if(choice=='y') ans='o'; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: a & c\n"; help2=help2-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } else { cout<<"saan nagtapos ang deathmarch\n" <<"a) camp Aguinaldo\tc) Intramuros\n" <<"b) camp Crame\t\td) camp O'Donnell \n"; do { cin>>ans; if (ans=='d') { cout<<"you are correct"<<endl; money=money+10000; } else if((ans=='b')||(ans=='c')||(ans=='a')) { cout<<"game over"<<endl;
money=10000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help2<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); } else if(choice=='y')ans='o'; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: a & d\n"; help2=help2-1; } } Else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d');
} cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pangapat na tanong\n\n" //4th question// <<"kung si Marcos ang naging diktador ng Pilipinas, sino naman sa Alemanya?\n" <<"a) Bonepart\t\tc) Hitler\n" <<"b) King Philip\t\td) Magellan\n"; do { cin>>ans; if (ans=='c') { cout<<"you are correct"<<endl; money=money+10000; } else if((ans=='b')||(ans=='a')||(ans=='d')) { cout<<"game over"<<endl; money=10000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help2<=0) cout<<"wala ka nang natitirang 50-50\n“ <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n";
do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); } else if(choice=='y')ans='o'; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: a & c\n"; help2=help2-1; } } else cout<<"invalid input\n"; } while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"panglimang tanong\n\n"; cout<<"alin sa mga sumusunod na pangalan ang ginamit ni rizal?\n" <<"a) Bagumbayan\t\tc) Lola basyang\n" <<"b) Tagailog\t\td) Dimasalang\n"; do { cin>>ans; if (ans=='d')
{ cout<<"you are correct"<<endl; money=money+50000; } else if((ans=='b')||(ans=='a')||(ans=='c')) { cout<<"game over"<<endl; money=10000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help2<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); } else if(choice=='y') ans='o'; }while(choice!='t'&&choice!='y'); } else {
cout<<"the choices now are: a & d\n"; help2=help2-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pasok ka na sa next round\n" <<"kahit mgkamali ka iyo na ang P100000\n"; inter(help2); return; } void inter(int help3) { char ans,choice; int money; int number = 0, number2 = 1; const int MAX = 2, MIN = 1; srand(time(NULL)); number = (rand() % (MAX - MIN +1))+MIN; money=100000; cout<<"Meron ka pang "<<help3<<" help\n"; system("PAUSE"); system("CLS"); if (number!=number2) //1st q//1 {
cout<<"unang tanong\n" <<"alin sa mga sumusunod ang gawa ng mitsubushi motors?\n" <<"a) Civic\t\tc) Escape\n" <<"b) Starex\t\td) Lancer\n"; do { cin>>ans; { cout<<"you are correct"<<endl; money=money+100000; } else if((ans=='b')||(ans=='a')||(ans=='c')) { cout<<"game over"<<endl; money=100000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help3<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t')
{ cout<<"your money is P"<<money; exit(); } else if(choice=='y')break; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: a & d\n"; help3=help3-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } else //1stq2// { cout<<"Ano ang ang sentro ng CardioVascular system?\n" <<"a) Kidney\t\tc) Mind\n" <<"b) Heart\t\td) Lungs\n"; do { cin>>ans; if (ans=='b') { cout<<"you are correct"<<endl; money=money+100000; }
else if((ans=='b')||(ans=='a')||(ans=='c')) { cout<<"game over"<<endl; money=100000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help3<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); } else if(choice=='y') break; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: b & d\n"; help3=help3-1; } } else
cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pangalawang tanong\n"//2ndq// <<"Anu ang DNA?\n" <<"a) Deoxyribo Nucleic Analysis\t\tc) Deoxyribo Nucleic Acid\n" <<"b) Deoyribo Nucleic Amalgam\t\td) Deoxyribo Nucleic Algae\n"; do { cin>>ans; if (ans=='c') { cout<<"you are correct"<<endl; money=money+100000; } else if((ans=='b')||(ans=='d')||(ans=='a')) { cout<<"game over"<<endl; money=100000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help3<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n"
<<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); } else if(choice=='y') break; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: a &c\n"; help3=help3-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); system("PAUSE"); system("CLS"); cout<<"ayon sa kasaysayan ng matematika, sino ang nakaimbento ng cartesian plane?\n" //3ndq// <<"a) Phytagoras c) Albert Einstein\n" <<"b) Rene Descartes d) Galeleo Galilei\n"; do { cin>>ans;
if (ans=='b') { cout<<"you are correct"<<endl; money=money+100000; } else if((ans=='c')||(ans=='d')||(ans=='a')) { cout<<"game over"<<endl; money=100000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help3<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); } else if(choice=='ybreak; }while(choice!='t'&&choice!='y'); } else {
cout<<"the choices now are: a & b\n"; help3=help3-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); system("PAUSE"); system("CLS"); cout<<"Sino ang tinaguriang Paladin of Philippine nationalism?\n //4thq// <<"a) Carlos P. Romulo\t\tc) Sergio Osmena Sr.\n"<<"b) Manuel L. Quezon\t\td) Claro M. Recto\n"; do { cin>>ans; if (ans=='d') { cout<<"you are correct"<<endl; money=money+100000; } else if((ans=='c')||(ans=='b')||(ans=='a')) { cout<<"game over"<<endl; money=100000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help3<=0) {
cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); } else if(choice=='y') break; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: a & d\n"; help3=help3-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); system("PAUSE"); system("CLS"); cout<<"Congratulations!! kahit magkamali ka s next question, ikaw ay maguuwi ng 500000\n"; inter2(help3); } void inter2(int help4)
{ char ans,choice; int money; money=500000; cout<<"Meron ka pang "<<help4<<" help\n"; system("PAUSE"); system("CLS"); cout<<"sa mga sumusunod na prutas, alin sa maga ito ang may pinakamaraming vimamin c\n" <<"a) Lemon\t\tc) Calamansi\n <<"b) Guava\t\td) Orange\n"; do { cin>>ans; if (ans=='b') { cout<<"you are correct"<<endl; money=money+500000; } else if((ans=='c')||(ans=='d')||(ans=='a')) { cout<<"game over"<<endl; money=100000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help4<=0) {
cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); } else if(choice=='y') break; }while(choice!='t'&&choice!='y'); } else { cout<<"the choices now are: b & c\n"; help4=help4-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); system("PAUSE"); system("CLS"); cout<<"saang bansa nagsimula ang pagpapalitan ng regalo sa twing araw ng pasko?\n"<<"a) Italy c) Norway\n" <<"b) Greece d) Israel\n"; do {
cin>>ans; if (ans=='a') { cout<<"you are correct"<<endl; money=money+2000000; } else if((ans=='c')||(ans=='d')||(ans=='a')) { cout<<"game over"<<endl; money=100000; cout<<"your money is "<<money; exit(); } else if(ans=='p') { if (help4<=0) { cout<<"wala ka nang natitirang 50-50\n" <<"do you want to take the money or continue the game?\n" <<"press [t] to take the money and and [y] to continue\n"; do { cin>>choice; if (choice=='t') { cout<<"your money is P"<<money; exit(); } else if(choice=='y') break; }while(choice!='t'&&choice!='y');
} else { cout<<"the choices now are: a & d\n"; help4=help4-1; } } else cout<<"invalid input\n"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); cout<<"ikaw ay may 2 Million na!\n" <<"ikaw ay isang milyonaryo na!\n"; system("PAUSE"); system("CLS"); exit(); } void exit() { cout<<"\nTHANKS for playing the game" <<"\nHAVE A NICE DAY!!"<<endl; exit (1); }