ca23885d8ed2589c631bb2a91bf03e99.ppt
- Количество слайдов: 50
MACHINE PROJECT CS 10 L/B 13 Submitted by: Bugayong, Capellamaeye S. Gresola, Camille C. Moreno, Jeannie Lou H. Queado, Princess Rachell Norielynn P.
“WHO WANTS TO BE A MILLIONARE GAME”
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 2(int); void exit(); int main() { char choice; cout<<"### ###"<<endl; cout<<" ### ## ### HO WANTS TO BE A MILLIONARE (PINOY VERSION)"<<endl; cout<<" ########"<<endl; cout<<"ang paglalaro ay madali lng. pindutin lng ang letra ng tamang sagotn“ <<"ikaw ay merong 3 50 -50 na kung saan ay magiging dalawa na lang iyong pagpipiliann"; cout<<"handa ka na ba? !n"; cout<<"pindutin lng ang [y] kung oo at [n] kung hindin"; cin>>choice; if (choice=='y') { game();
} else if (choice=='n') { cout<<"bye"<<endl; exit(1); } else cout<<"invalid ang iyong sagotn"; exit(1); return 0; } void game() { int money, help; char ans, choice; int number = 0, number 2 = 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 -50n"; cout<<"easy questions muna taunn" <<"Unang tanongn"; //1 st question 1000// if (number==number 2) {
cout<<"Sino ang presidente nahalal noong 1965? n" <<"a) Marcosttc) Arroyon" <<"b) Aquinottd) Estradan"; 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 & cn"; help=help-1; } else cout<<"invalid inputn"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); if ((ans=='c')||(ans=='b')||(ans=='d')) { cout<<"game overn" <<"wla kang perang maiuuwi. ";
exit(); } else { } } cout<<"Ano ang ginagamit sa panligo? " <<"na) sipilyottc) sabon" <<"nb) kutsarattd) 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 & dn"; help=help-1; } else cout<<"invalid inputn"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d');
cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pangalawang tanongn"; //2 nd question 1000// cout<<"Ano ang ginagamit kapag mapurol ang lapis? " <<"na) tsinelasttc) panghasa" <<"nb) pantasattd) wla sa choices"<<endl; do { else if(ans=='p') 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(); } { } cout<<"the choices now are: b & cn"; help=help-1;
else if(ans=='p') { } else cout<<"the choices now are: b & cn"; help=help-1; cout<<"invalid inputn"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pangatlong tanongn"; //3 rd question 1000// if (number==number 2) { cout<<"kung ikaw ay teacher anu ang ginagawa mo? " <<"na) nagbebentattc) naglilinis“ <<"nb) nagtuturottd) 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 -50n"; } else cout<<"the choices now are: b & cn"; help=help-1; } else cout<<"invalid inputn"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } else { cout<<"ano ang pinakamataas na bundok dito sa pilipinasn" <<"a) Everestttc) Mayonn" <<"b) Pinatubottd) Apon"<<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 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & dn";
help=help-1; } } else cout<<"invalid inputn"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pangapat na tanongn"; //4 th question 2000// cout<<"ayon sa kasabihan, anu daw ang meron pag may tiyaga? " <<"na) nilagat c) tubig" <<"nb) lupatt 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 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & cn";
help=help-1; } } else cout<<"invalid inputn"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"ikalimang tanongn" //5 th question// <<"ito ang huling tanong para sa Easy roundn"; if (number!=number 2) { cout<<"ano ang pambansang hayop ng pilipinas? " <<"na) kabayottc) kalabaw" <<"nb) baboyttd) 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 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & cn"; help=help-1; } } else cout<<"invalid inputn"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } else {
cout<<"ano ang unang sakramento na tatanggapin mo kung ikaw ay kristyano? " <<"na) binyagttc) kasal" <<"nb) kumpilttd) 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 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & cn"; help=help-1; } } else cout<<"invalid inputn"; }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 10000n" <<"pumunta na tau sa next categoryn" <<"ito ay medium roundn"; midgame(help); return; } void midgame(int help 2) { char ans, choice; int money; int number = 0, number 2 = 1; const int MAX = 2, MIN = 1; srand(time(NULL));
number = (rand() % (MAX - MIN +1))+MIN; money=10000; cout<<"Meron ka pang "<<help 2<<" helpn" <<"unang tanongn"; system("PAUSE"); system("CLS"); if(number!=number 2)//1 st question// { cout<<"kung ang relihiyon mo ay islam, anu ang hayop na hindi ninyo kinakain? n" <<"a) bakattc) manokn"<<"b) baboytd) kambingn"; 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 (help 2<=0) { cout<<"wala ka nang natitirang 50 -50n" <<"do you want to take the money or continue the game? n"
<<"press [t] to take the money and [y] to continuen"; 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 & cn"; help 2=help 2 -1; } } else cout<<"invalid inputn"; }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) chemistryttc) pathologyn" <<"b) sociologyttd) geologyn"; 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 (help 2<=0) { cout<<"wala ka nang natitirang 50 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & dn"; help 2=help 2 -1; } } else cout<<"invalid inputn"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pangalawang tanongnn"; //2 ndquestion// if (number!=number 2) { cout<<"saan ginuhit ni Juan luna ang Spolaruim na nananlo ng gold prize noong 1884" <<"na) Madridttc) Maynila" <<"nb) Alemanyattd) 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 (help 2<=0) { cout<<"wala ka nang natitirang 50 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & cn"; help 2=help 2 -1; }
} else cout<<"invalid inputn"; }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 ttc) Ang huling panghimakas" <<"nb) Fray Botod\td) Noli Me Tangeren"; 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 (help 2<=0) {
cout<<"wala ka nang natitirang 50 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & bn"; help 2=help 2 -1; } } else cout<<"invalid inputn"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pangatlong tanongnn"; //3 rd question// if(number==number 2) {
cout<<"sino ang sumulat ng macbethn" <<"a) Edgar Allan Poettc) Shakespeare"<<"nb) Dantettd) 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 (help 2<=0) { cout<<"wala ka nang natitirang 50 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & cn"; help 2=help 2 -1; } } else cout<<"invalid inputn"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } else { cout<<"saan nagtapos ang deathmarchn" <<"a) camp Aguinaldotc) Intramurosn" <<"b) camp Cramettd) 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 (help 2<=0) { cout<<"wala ka nang natitirang 50 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & dn"; help 2=help 2 -1; } } Else cout<<"invalid inputn"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d');
} cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pangapat na tanongnn" //4 th question// <<"kung si Marcos ang naging diktador ng Pilipinas, sino naman sa Alemanya? n" <<"a) Bonepartttc) Hitlern" <<"b) King Philipttd) Magellann"; 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 (help 2<=0) cout<<"wala ka nang natitirang 50 -50n“ <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen";
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 & cn"; help 2=help 2 -1; } } else cout<<"invalid inputn"; } while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"panglimang tanongnn"; cout<<"alin sa mga sumusunod na pangalan ang ginamit ni rizal? n" <<"a) Bagumbayanttc) Lola basyangn" <<"b) Tagailogttd) Dimasalangn"; 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 (help 2<=0) { cout<<"wala ka nang natitirang 50 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & dn"; } else } help 2=help 2 -1; cout<<"invalid inputn"; }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 roundn" <<"kahit mgkamali ka iyo na ang P 100000n"; inter(help 2); return; } void inter(int help 3) { char ans, choice; int money; int number = 0, number 2 = 1; const int MAX = 2, MIN = 1; srand(time(NULL)); number = (rand() % (MAX - MIN +1))+MIN; money=100000; cout<<"Meron ka pang "<<help 3<<" helpn"; system("PAUSE"); system("CLS"); if (number!=number 2) //1 st q//1 {
cout<<"unang tanongn" <<"alin sa mga sumusunod ang gawa ng mitsubushi motors? n" <<"a) Civicttc) Escapen" <<"b) Starexttd) Lancern"; 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 (help 3<=0) { cout<<"wala ka nang natitirang 50 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & dn"; help 3=help 3 -1; } } else cout<<"invalid inputn"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } else //1 stq 2// { cout<<"Ano ang sentro ng Cardio. Vascular system? n" <<"a) Kidneyttc) Mindn" <<"b) Heartttd) Lungsn"; 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 (help 3<=0) { cout<<"wala ka nang natitirang 50 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & dn"; help 3=help 3 -1; } } else
cout<<"invalid inputn"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); } cout<<"ang pera mo ay P"<<money<<endl; system("PAUSE"); system("CLS"); cout<<"pangalawang tanongn"//2 ndq// <<"Anu ang DNA? n" <<"a) Deoxyribo Nucleic Analysisttc) Deoxyribo Nucleic Acidn" <<"b) Deoyribo Nucleic Amalgamttd) Deoxyribo Nucleic Algaen"; 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 (help 3<=0) { cout<<"wala ka nang natitirang 50 -50n" <<"do you want to take the money or continue the game? n"
<<"press [t] to take the money and [y] to continuen"; 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 &cn"; help 3=help 3 -1; } } else cout<<"invalid inputn"; }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" //3 ndq// <<"a) Phytagoras c) Albert Einsteinn" <<"b) Rene Descartes d) Galeleo Galilein"; 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 (help 3<=0) { cout<<"wala ka nang natitirang 50 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & bn"; help 3=help 3 -1; } } else cout<<"invalid inputn"; }while(ans!='a' && ans!='b' && ans!='c'&& ans!='d'); system("PAUSE"); system("CLS"); cout<<"Sino ang tinaguriang Paladin of Philippine nationalism? n //4 thq// <<"a) Carlos P. Romulottc) Sergio Osmena Sr. n"<<"b) Manuel L. Quezonttd) Claro M. Recton"; 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 (help 3<=0) {
cout<<"wala ka nang natitirang 50 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & dn"; help 3=help 3 -1; } } else cout<<"invalid inputn"; }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 500000n"; inter 2(help 3); } void inter 2(int help 4)
{ char ans, choice; int money; money=500000; cout<<"Meron ka pang "<<help 4<<" helpn"; system("PAUSE"); system("CLS"); cout<<"sa mga sumusunod na prutas, alin sa maga ito ang may pinakamaraming vimamin cn" <<"a) Lemonttc) Calamansin <<"b) Guavattd) Orangen"; 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 (help 4<=0) {
cout<<"wala ka nang natitirang 50 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & cn"; help 4=help 4 -1; } } else cout<<"invalid inputn"; }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) Norwayn" <<"b) Greece d) Israeln"; 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 (help 4<=0) { cout<<"wala ka nang natitirang 50 -50n" <<"do you want to take the money or continue the game? n" <<"press [t] to take the money and [y] to continuen"; 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 & dn"; help 4=help 4 -1; } } else cout<<"invalid inputn"; }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<<"n. THANKS for playing the game" <<"n. HAVE A NICE DAY!!"<<endl; exit (1); }
Member Name Bugayong, Capellamaeye S. Gresola, Camille C. Moreno, Jeannie Lou H. Queado, Princess Rachell Norielynn P. Task Module programmed
ca23885d8ed2589c631bb2a91bf03e99.ppt