Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Code must be in C++ language. The problem You are to write a program named Program2.cpp. It will calculate per capita (per person) income and
Code must be in C++ language.
The problem You are to write a program named Program2.cpp. It will calculate per capita ("per person") income and state income tax. Your prompts and output should be formatted exactly like the examples below Your program will do the followin 1. Prompt the user for their name 2. Get the name from the user and store it. 3. Prompt the user for the salary, commissions, and bonus (no commas or dollar sign) 4. Get the salary, commissions, and bonus and store them. 5. Prompt the user to input the number of dependents 6. Get the number of dependents from the user and store it. 7. Instead of a prompt, display a "menu," which lists various states that the user might be from according to the example below. BE SURE THAT THE MENU LISTS THE STATES IN THE SAME ORDER AS THE EXAMPLES BELOW 8. Get the state from the user (actually, get the letter on the menu that corresponds to the state see notes below). The user should be able to type in either the lower or upper case letter and have it mean the same thing. If the letter that is input does not correspond to a state, print "lllegal letter for state" and then stop the program by using the single statement cin.get) return l; after the statement that prints the error 9. Skip a line before starting the output and print the user's name 10. Calculate and print the total income (salary commissions+bonus). Indent it and everything below by one tab 11. Print the number of dependents 12. Calculate and print the adjusted income. Take the total income and subtract 1000 for each dependent. However, if the adjusted income comes out to be negative, set it to 0 instead 13. Calculate and print the tax (adjusted incometax rate for the state). The tax is as follows Arizona Florida, lowa California Hawaii, Nevada 6% 4% 8% 7% 14. Calculate and print the per capita income (total income umber of dependents)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started