Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float mealMath(numberOfAdults, mealChoosing){
- //Rest of function
- }
- int numberOfAdults(){
- int totalAdults;
- cout << "Now how many adults will there be?: ";
- cin >> totalAdults;
- cout << "It seems there will be: " << totalAdults << " Adults." << endl;
- while(totalAdults < 1){
- cout << "Sorry there has to be a minimum of 1 adult!" << endl;
- cout << "How many adults: ";
- cin >> totalAdults;
- }
- return 0;
- }
- int numberOfKids(){
- int totalKids;
- cout << "Now how many Kids will there be?: ";
- cin >> totalKids;
- cout << "It seems there will be: " << totalKids << " kids." << endl;
- while(totalKids < 0){
- cout << "Sorry there has to be a minimum of 1 Kid!" << endl;
- cout << "How many Kids: ";
- cin >> totalKids;
- }
- return 0;
- float mealChoosing(){
- float cost;
- string mealChoise;
- cout << " " << endl;
- cout << "Now, What meal will you be getting(D/S): ";
- cin >> mealChoise;
- if(mealChoise == "D"){
- cout << "It seems you have selected the Deluxe Meal plan for everyone!" << endl;
- cost = 25.95;
- }
- if(mealChoise == "S"){
- cout << "It seems you have selected the Standard Meal plan for everyone!" << endl;
- cost = 21.75;
- }
- cout << " " << endl;
- return cost;
- }
- "float total(){
- float totalBill;
- totalBill = numberOfAdults * mealChoosing;
- cout << totalBill;"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement