Computers and Technology
Computers and Technology, 07.04.2020 19:03, Jrstx333

C++ only

A student has established the following monthly budget:

Housing $500.00

Utilities $150.00

Household Expenses $65.00

Transportation $50.00

Food $250.00

Medical $30.00

Insurance $100.00

Entertainment $150.00

Clothing $75.00

Miscellaneious $50.00

Write a program that has a 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 indicatin the amount over or under in each category, as well as the amount over or under for the entire monthly budget.

1st test case:

input:

500 125 85 40 225.50 0 100 150 75 52.75
expected output:

Enter housing cost for the month:$↵
Enter utilities cost for the month:$↵
Enter household expenses cost for the month:$↵
Enter transportation cost for the month:$↵
Enter food cost for the month:$↵
Enter medical cost for the month:$↵
Enter insurance cost for the month:$↵
Enter entertainment cost for the month:$↵
Enter clothing cost for the month:$↵
Enter miscellaneous cost for the month:$↵
Housing Even↵
Utilities Under↵
Household Expenses Over↵
Transportation Under↵
Food Under↵
Medical Under↵
Insurance Even↵
Entertainment Even↵
Clothing Even↵
Miscellaneous Over↵
You were $66.75 under budget
2nd test case:

your input:

500 175.25 40 40 225.50 0 100 75.85 50 60.70
expected output:

Enter housing cost for the month:$↵
Enter utilities cost for the month:$↵
Enter household expenses cost for the month:$↵
Enter transportation cost for the month:$↵
Enter food cost for the month:$↵
Enter medical cost for the month:$↵
Enter insurance cost for the month:$↵
Enter entertainment cost for the month:$↵
Enter clothing cost for the month:$↵
Enter miscellaneous cost for the month:$↵
Housing Even↵
Utilities Over↵
Household Expenses Under↵
Transportation Under↵
Food Under↵
Medical Under↵
Insurance Even↵
Entertainment Under↵
Clothing Under↵
Miscellaneous Over↵
You were $152.70 under budget

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:30, robert7248
You have a large, late-model pick-up truck with a rear seat. the pick-up truck weighs 6,500 pounds. the florida seat belt law
Answers: 1
image
Computers and Technology, 23.06.2019 01:20, shiann2002
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
image
Computers and Technology, 23.06.2019 08:00, leleee10
Which argument is not a valid filter? does not equal this quarter filter by cell color all of these are valid filter arguments.
Answers: 2
image
Computers and Technology, 23.06.2019 09:30, blake2001
Which of the following tasks is an audio technician most likely to perform while working on a nature documentary? (select all that apply). eliminating potentially distracting background noise adding sound effects making sure the lighting is adequate for a particular scene changing the narration to better match the mood of the documentary
Answers: 3
Do you know the correct answer?
C++ only

A student has established the following monthly budget:

Housing $...

Questions in other subjects:

Konu
Mathematics, 25.03.2020 23:54
Konu
Mathematics, 25.03.2020 23:54