Hello, I'm having trouble with this coding exercise. I understand the route I must take but its a bit confusing with ea
Posted: Mon Jun 06, 2022 1:55 pm
Hello, I'm having trouble with this coding exercise. I
understand the route I must take but its a bit confusing with each
expense category, I also provided a screenshot of a few sample
outputs. Your help will be much
appreciated, c++
Sample Output
A student has established the following monthly budget" Housing $500.00 Utilities $75.00 Household Expenses $150.00 Transportation $50.00 Food $250.00 Miscellaneous $200.00 Write a program that has MonthlyBudget structure designed to hold each of these expense categories. The program should pass the structure to a function that asks the user to enter the amounts spent in each budget category during a month. The program should then pass the structure to a function that displays a report indicating the amount over or under in each category, as well as the amount over or under the entire monthly budget. Grading will be affected by: Proper formatting. Use left, right, and setw manipulators as needed. Ex: cout <<setw(18) << left << "Miscellanous" <<setw(16) << right No input validation is required. Use of at least two functions.
Enter the amount spent for housing: 500 Enter the amount spent for utilities: 150 Enter the amount spent for household expenses: 200 Enter the amount spent for transportation: 50 Enter the food expenses: 150 Enter the miscellaneous expenses: 200 Category Budgeted Spent Over(-)/Under Housing 500.00 500.00 0.00 Utilities 75.00 150.00 -75.00 Household 150.00 200.00 -50.00 Transportation 50.08 50.00 0.00 Food 250.00 150.00 100.00 0.00 Miscellanous 200.00 200.00 For the month you are over budget by $-25.00 Enter the amount spent for housing: 500 Enter the amount spent for utilities: 75 Enter the amount spent for household expenses: 100 Enter the amount spent for transportation: 50 Enter the food expenses: 200 Enter the miscellaneous expenses: 200 Category Budgeted Spent Over (-)/Under Housing 500.00 500.00 0.00 Utilities 75.00 75.00 0.00 Household 150.00 100.00 50.00 Transportation 50.00 50.00 0.00 Food 250.00 200.00 50.00 Miscellanous 200.00 200.00 0.00 For the month you are under budget by $100.00
understand the route I must take but its a bit confusing with each
expense category, I also provided a screenshot of a few sample
outputs. Your help will be much
appreciated, c++
Sample Output
A student has established the following monthly budget" Housing $500.00 Utilities $75.00 Household Expenses $150.00 Transportation $50.00 Food $250.00 Miscellaneous $200.00 Write a program that has MonthlyBudget structure designed to hold each of these expense categories. The program should pass the structure to a function that asks the user to enter the amounts spent in each budget category during a month. The program should then pass the structure to a function that displays a report indicating the amount over or under in each category, as well as the amount over or under the entire monthly budget. Grading will be affected by: Proper formatting. Use left, right, and setw manipulators as needed. Ex: cout <<setw(18) << left << "Miscellanous" <<setw(16) << right No input validation is required. Use of at least two functions.
Enter the amount spent for housing: 500 Enter the amount spent for utilities: 150 Enter the amount spent for household expenses: 200 Enter the amount spent for transportation: 50 Enter the food expenses: 150 Enter the miscellaneous expenses: 200 Category Budgeted Spent Over(-)/Under Housing 500.00 500.00 0.00 Utilities 75.00 150.00 -75.00 Household 150.00 200.00 -50.00 Transportation 50.08 50.00 0.00 Food 250.00 150.00 100.00 0.00 Miscellanous 200.00 200.00 For the month you are over budget by $-25.00 Enter the amount spent for housing: 500 Enter the amount spent for utilities: 75 Enter the amount spent for household expenses: 100 Enter the amount spent for transportation: 50 Enter the food expenses: 200 Enter the miscellaneous expenses: 200 Category Budgeted Spent Over (-)/Under Housing 500.00 500.00 0.00 Utilities 75.00 75.00 0.00 Household 150.00 100.00 50.00 Transportation 50.00 50.00 0.00 Food 250.00 200.00 50.00 Miscellanous 200.00 200.00 0.00 For the month you are under budget by $100.00