Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Fill in the code on the next page tosolve the following problem. Comments are no

ID: 3614060 • Letter: F

Question

Fill in the code on the next page tosolve the following problem. Comments are not needed.


a. From the keyboard read aperson’s character tax code (‘S’ for Single,‘M’ for Married, and ‘H’ for Head ofHousehold) and his/her annual income. Include an error checking doloop to ensure the tax code is one of the three permittedcharacters. No user prompts are needed.


b. Call a user-defined functionnamed Taxes which is passed the tax code and theannual income and returns the tax amount. This function uses iflogic to compute the correct tax using the tax rate table seenbelow. The function should be set up following standards studied inclass. Comments are not needed.


1 0.30

2 0.25

3 0.28


#include<iostream>

using namespacestd;

_________________________________________ // write Taxesfunction heading


int main ( )

{

________________________________________ // declarevariables ________________________________________

________________________________________


________________________________________ // Write a do loopto read a valid tax code

________________________________________ // from thekeyboard.

________________________________________


________________________________________ // Read the salaryfrom the keyboard.

________________________________________ //Assign the taxamount from the return value of

// thefunction.

________________________________________ //Output the taxamount to the monitor

return 0;

}

// Write the Taxes functionin the space below.




THANKS IN ADVANCE AND I WILLRATE!!!!!!!!!!




Explanation / Answer

please rate - thanks #include using namespace std; doubleTaxes(char,double);             // write Taxes function heading int main ( ) { charcode;                             // declare variables ________________________________________ double tax,income; do{                                     // Write a do loop to read a valid tax code cin>>code;                             // from the keyboard. }while(code!='S'&&code!='M'&&code!='H'); cin>>income;                             // Read the salary from the keyboard. tax=Taxes(code,income);                  //Assign the tax amount from the return value of // the function. cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote