Results 1 to 2 of 2
I have this program and i really dont even know where to begin because our teacher doesnt explain anything so i dont know how to make a chart of this ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-06-2005 #1
- Join Date
- Oct 2005
plz Help with a c++ program using g++ compiler
Programming Assignment 5
A catering service has the following schedule of charges for meals that it serves to groups and discounts according to how many were ordered:
If order more than
Write a C++ program that reads the number of each meal ordered. Then do the computations and print results as indicated below. The program should compute, for each category, the cost of the meals received in each category, the discount, and the final cost of the meals. It should then compute the total cost of all meals, add a 10% sates tax and print the total due. Be sure to format the output. No loop is necessary.
Make your output is attractive and include appropriate comments in your program. Below is an example of what the inputs and output of the program should look like.
For each meal, Cost Each, Discount, and If order more than should be constants. The calculation of the discount HAS to be done in a function. There should be only 1 function to calculate all three different meal types. The function prototype will look like this:
double calcCommission (int quantity, double costEach, double discountPerCent, int orderMoreThan);
Enter the number of Breakfasts ordered: 30
Enter the number of Lunches ordered: 28
Enter the number of Dinners ordered: 25
My Favorite Catering Service
Cost After Discount
and i have this so far... not sure where else to go..
using namespace std;
double calcCommission (int quantity, double costEach, double discountPerCent, int ifOrderMoreThan);
int main ( )
int breakfast, lunch, dinner;
double costEach, discount, ifOrderMoreThan;
- 10-07-2005 #2
- Join Date
- Apr 2005
- South America
Dont wanna leave you in the blue... but I missed the point where these forums where about making your homework