Design (pseudocode) and implement (source code) a program (name it IncomeTax) th
ID: 3748485 • Letter: D
Question
Design (pseudocode) and implement (source code) a program (name it IncomeTax) that reads from the user annual income, as integer value, and calculates the income tax based on the tax table below. Income Tax bracket Annual income <= $50,000 5% $50,000 < Annual income <= $200,000 10% $200,000 < Annual income <= $400,000 15% $400,000 < Annual income <= $900,000 25% $900,000 < Annual income 35% The program output should include the entered annual income followed by the applied tax bracket and the tax amount. Document your code and properly label the input prompts and the outputs as shown below. Note: Taxes are computed based on brackets. For example, if one’s income falls in the 15% bracket, the first $50,000 is taxed at 5% rate, the next $100,000 is taxed at the 10% rate, and the remaining income is taxed at the 15% rate. Sample run 1: Annual Income:$25,000 Tax Bracket:5% Tax due amount:$1250 Sample run 2: Annual Income:$350,000 Tax Bracket:15% Tax due amount:$37500 Sample run 3: Annual Income:$800,000 Tax Bracket:25% Tax due amount:$120000 Design (pseudocode) and implement (source code) a program (name it IncomeTax) that reads from the user annual income, as integer value, and calculates the income tax based on the tax table below. Income Tax bracket Annual income <= $50,000 5% $50,000 < Annual income <= $200,000 10% $200,000 < Annual income <= $400,000 15% $400,000 < Annual income <= $900,000 25% $900,000 < Annual income 35% The program output should include the entered annual income followed by the applied tax bracket and the tax amount. Document your code and properly label the input prompts and the outputs as shown below. Note: Taxes are computed based on brackets. For example, if one’s income falls in the 15% bracket, the first $50,000 is taxed at 5% rate, the next $100,000 is taxed at the 10% rate, and the remaining income is taxed at the 15% rate. Sample run 1: Annual Income:$25,000 Tax Bracket:5% Tax due amount:$1250 Sample run 2: Annual Income:$350,000 Tax Bracket:15% Tax due amount:$37500 Sample run 3: Annual Income:$800,000 Tax Bracket:25% Tax due amount:$120000 Design (pseudocode) and implement (source code) a program (name it IncomeTax) that reads from the user annual income, as integer value, and calculates the income tax based on the tax table below. Income Tax bracket Annual income <= $50,000 5% $50,000 < Annual income <= $200,000 10% $200,000 < Annual income <= $400,000 15% $400,000 < Annual income <= $900,000 25% $900,000 < Annual income 35% The program output should include the entered annual income followed by the applied tax bracket and the tax amount. Document your code and properly label the input prompts and the outputs as shown below. Note: Taxes are computed based on brackets. For example, if one’s income falls in the 15% bracket, the first $50,000 is taxed at 5% rate, the next $100,000 is taxed at the 10% rate, and the remaining income is taxed at the 15% rate. Sample run 1: Annual Income:$25,000 Tax Bracket:5% Tax due amount:$1250 Sample run 2: Annual Income:$350,000 Tax Bracket:15% Tax due amount:$37500 Sample run 3: Annual Income:$800,000 Tax Bracket:25% Tax due amount:$120000Explanation / Answer
#include<iostream>
using namespace std;
int main(){
int income, bracket, amount;
cout<<"Annual Income :$";
cin>>income;
if(income <= 50000){
bracket = 5;
amount = 0.05*income;
} else if(income > 50000 && income <= 200000){
bracket = 10;
amount = (0.05*50000) + (0.1*(income-50000));
} else if(income > 200000 && income <= 400000){
bracket = 15;
amount = (0.05*50000) + (0.1*200000) + (0.15*(income-250000));
} else if(income > 400000 && income <= 900000){
bracket = 25;
amount = (0.05*50000) + (0.1*200000) + (0.15*400000) + (0.25*(income-650000));
} else if(income > 900000){
bracket = 35;
amount = (0.05*50000) + (0.1*200000) + (0.15*400000) + (0.25*900000) + (0.35*(income-1150000));
}
cout<<"Tax Bracket:"<<bracket<<"%";
cout<<" Tax due amount:$"<<amount;
}