Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- const float COST_EYE = 3.35;
- const float COST_SPLEEN = 2.75;
- const float COST_LIVER = 14.58;
- const float COST_APPENDIX = 0.50;
- const float COST_BRAINS = 7.85;
- const float COST_EAR = 13.45;
- const float WT_BRAIN = 0.4;
- const float WT_SPLEEN = 5.6;
- const float WT_LIVER = 3.0;
- const float WT_APPENDIX = 1.2;
- const float WT_EYE = 2.3;
- const float WT_EAR = 10.0;
- char input;
- int quit = 0;
- while(quit == 0)
- {
- cout << "MAIN MENU" << endl;
- cout << "1.) eyeballs" << endl;
- cout << "2.) spleen" << endl;
- cout << "3.) liver" << endl;
- cout << "4.) appendix" << endl;
- cout << "5.) brains" << endl;
- cout << "6.) earlobes" << endl;
- cout << "7.) Quit" << endl;
- cin >> input;
- switch(input)
- {
- case '1':
- cout << "That will cost $3.35" << endl;
- break;
- case '2':
- cout << "That will cost $2.75" << endl;
- break;
- case '3':
- cout << "That will cost $14.58" << endl;
- break;
- case '4':
- cout << "That will cost $0.50" << endl;
- break;
- case '5':
- cout << "That will cost $7.85" << endl;
- break;
- case '6':
- cout << "That will cost $13.45" << endl;
- break;
- case '7':
- quit = 1;
- break;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement