Programming Project 2
Restaurant Helper
Tip Calculation Table Amount 15% 20% 25% 10 1.50 2.00 2.50 15 2.25 3.00 3.75 20 3.00 4.00 5.00 25 3.75 5.00 6.25 30 4.50 6.00 7.50 35 5.25 7.00 8.75 40 6.00 8.00 10.00
linux1[23]% gcc -ansi -Wall proj2.c linux1[24]% a.out Your greeting goes here. Please enter the total check amount: 5 The total must be between 10.00 and 100.00 Please enter the total check amount: 150 The total must be between 10.00 and 100.00 Please enter the total check amount: 100 P - Print the tip table A - Add the tip S - Split the check E - Enter a new total check amount Q - Quit Enter your menu selection: P Tip Calcuation Table Amount 15% 20% 25% 10 1.50 2.00 2.50 15 2.25 3.00 3.75 20 3.00 4.00 5.00 25 3.75 5.00 6.25 30 4.50 6.00 7.50 35 5.25 7.00 8.75 40 6.00 8.00 10.00 45 6.75 9.00 11.25 50 7.50 10.00 12.50 55 8.25 11.00 13.75 60 9.00 12.00 15.00 65 9.75 13.00 16.25 70 10.50 14.00 17.50 75 11.25 15.00 18.75 80 12.00 16.00 20.00 85 12.75 17.00 21.25 90 13.50 18.00 22.50 95 14.25 19.00 23.75 100 15.00 20.00 25.00 P - Print the tip table A - Add the tip S - Split the check E - Enter a new total check amount Q - Quit Enter your menu selection: A Enter the tip: 20.00 The total amount of your bill with tip included is $120.00. P - Print the tip table A - Add the tip S - Split the check E - Enter a new total check amount Q - Quit Enter your menu selection: S How many ways would you like to split the check? 2 If you split the check 2 ways, each person should pay $60.00. P - Print the tip table A - Add the tip S - Split the check E - Enter a new total check amount Q - Quit Enter your menu selection: e Enter a new total amount: 20.50 P - Print the tip table A - Add the tip S - Split the check E - Enter a new total check amount Q - Quit Enter your menu selection: P Tip Calcuation Table Amount 15% 20% 25% 10 1.50 2.00 2.50 15 2.25 3.00 3.75 20 3.00 4.00 5.00 25 3.75 5.00 6.25 30 4.50 6.00 7.50 35 5.25 7.00 8.75 40 6.00 8.00 10.00 45 6.75 9.00 11.25 50 7.50 10.00 12.50 55 8.25 11.00 13.75 60 9.00 12.00 15.00 65 9.75 13.00 16.25 70 10.50 14.00 17.50 75 11.25 15.00 18.75 80 12.00 16.00 20.00 85 12.75 17.00 21.25 90 13.50 18.00 22.50 95 14.25 19.00 23.75 100 15.00 20.00 25.00 P - Print the tip table A - Add the tip S - Split the check E - Enter a new total check amount Q - Quit Enter your menu selection: a Enter the tip: 4.00 The total amount of your bill with tip included is $24.50. A - Add the tip P - Print the tip table S - Split the check E - Enter a new total check amount Q - Quit Enter your menu selection: q I hope you enjoyed your meal!!
Here is a sample submission command. Note that the project name starts with uppercase 'P'.
submit cs104_0201 Proj2 proj2.c
To verify that your project was submitted, you can execute the following command at the Unix prompt. It will show the file that you submitted in a format similar to the Unix 'ls' command.
submitls cs104_0201 Proj2