Pad 10:50 PM Documents Undo You are to write a C++ program to compute federal pe
ID: 3863859 • Letter: P
Question
Pad 10:50 PM Documents Undo You are to write a C++ program to compute federal personal income taxes. Program is to have no global variables. Use the concepts we have encountered in the first seven chapters. You are not to use functions, enums, arrays, structs, classes, or pointers. The tax owned depends on how much money one makes as well as their filing status. For use four filing statuses. These are ()single filers, (2)married filing our purposes we wi inintlv Rhmarried filino senaratelv and u4hhead nf hem erhald Tax Single Filers Married Filing Married Filing Head of Jointly Separately 2 12% Up to S7,550 Up to S15.100 Up to S7,550 Up to S10,750 3 16% S7.551-S30,650 S15,101-S61,300 S7,551-S30,650 S10,751-S41,050 4 20% S30,651-S74,200 S61,301-S123,700 S30,651-S61,850 S41,051-S106,000 28% S74, 201-S154,800 S123,701- $61,851-S94.225 S106,001- S171,650 S188,450 32% S154,801- S188,451- $94,226 S168,275 S171,651- S336,550 S336,550 S336,550 7 40% S336,551 or more S336,551 or more S168,276 or more S336,551 or more For each filing status there are six tax rates. Each rate is applied to a given amount of the taxable income. For example, for a taxable income of S450,000 for a single filer, S7,550 is taxed at 12%, ($30,650-S7,550) at 16%, (S74,200-S30,650) at 20% (S154,800- S74,200) at 28%, (S336,550-$154.800) at 32%, and (S450,000-336,550) at 40% for a tax amount of S139,419. Variables Name Type Description and edit specifications status Code int Status code must be from l to 4. l single, 2 married filing jointly, 3 married filing separately, 4 head of household, 9-end processing. taxable Income float Taxable income is entered by the user from the keyboard. The amount must be numeric and not less than S3000. tax Amt is a calculated field and is determined from the supplied tax table as applied to the taxablelncome. 75%Explanation / Answer
//calculate tax amount on basis of status code
//Author:Rashmi Tiwari
//Date 19/03/2017
#include<iostream>
#include<conio.h>
#include<iomanip>
#include<string.h>
using namespace std;
int main(){
int statusCode;
float taxableIncome;
float taxAmt;
int taxRate;
cout<<"Enter 1 for Single Filers"<<endl;
cout<<"Enter 2 for Married Filing Jointly"<<endl;
cout<<"Enter 3 for Married Filing Seperately"<<endl;
cout<<"Enter 4 for Head Of Household"<<endl;
cout<<"Enter the choice for status code"<<endl;
cin>>statusCode;
while(statusCode!=9){
do{
cout<<"Enter taxable Income"<<endl;
cin>>taxableIncome;
switch(statusCode){
case 1:{
if(taxableIncome<=7550){
taxAmt=taxableIncome+(taxableIncome*12)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax Amt"<<endl;
cout<<setw(15)<<7550<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<"Total Tax"<<setw(15)<<""<<setw(15)<<taxAmt<<endl;
cout<<" Filing status "<<" Single Filers"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>7550&&taxableIncome<=30650){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax amt"<<endl;
cout<<setw(15)<<7550<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(7550-30650)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<" Filing status "<<" Single Filers"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>30650&&taxableIncome<=74200){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax Amt"<<endl;
cout<<setw(15)<<7550<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(7550-30650)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(30650-74200)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<" Filing status "<<" Single Filers"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>74200&&taxableIncome<=154800){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100+(taxableIncome*28)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax Amt"<<endl;
cout<<setw(15)<<7550<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(7550-30650)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(30650-74200)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<setw(15)<<(74200-154800)<<setw(15)<<28<<setw(15)<<(taxableIncome*28/100)<<endl;
cout<<" Filing status "<<" Single Filers"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>154800&&taxableIncome<=336550){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100+(taxableIncome*28)/100+(taxableIncome*32)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax amt"<<endl;
cout<<setw(15)<<7550<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(7550-30650)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(30650-74200)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<setw(15)<<(74200-154800)<<setw(15)<<28<<setw(15)<<(taxableIncome*28/100)<<endl;
cout<<setw(15)<<(154800-336550)<<setw(15)<<32<<setw(15)<<(taxableIncome*32/100)<<endl;
cout<<" Filing status "<<" Single Filers"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else{
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100+(taxableIncome*28)/100+(taxableIncome*32)/100+(taxableIncome*40)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax amt"<<endl;
cout<<setw(15)<<7550<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(7550-30650)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(30650-74200)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<setw(15)<<(74200-154800)<<setw(15)<<28<<setw(15)<<(taxableIncome*28/100)<<endl;
cout<<setw(15)<<(154800-336550)<<setw(15)<<32<<setw(15)<<(taxableIncome*32/100)<<endl;
cout<<setw(15)<<336550<<setw(15)<<40<<setw(15)<<(taxableIncome*40/100)<<endl;
cout<<" Filing status "<<" Single Filers"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
break;
}
case 2:
{
if(taxableIncome<=15100){
taxAmt=taxableIncome+(taxableIncome*12)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax Amt"<<endl;
cout<<setw(15)<<15100<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<"Total Tax"<<setw(15)<<""<<setw(15)<<taxAmt<<endl;
cout<<" Filing status "<<" Married Filling Jointly"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>15100&&taxableIncome<=61300){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax amt"<<endl;
cout<<setw(15)<<15100<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(15100-61300)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<" Filing status "<<" Married Filing Jointly"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>61300&&taxableIncome<=123700){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax Amt"<<endl;
cout<<setw(15)<<15100<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(15100-61300)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(61300-123700)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<" Filing status "<<" Married Filing Jointly"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>123700&&taxableIncome<=188450){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100+(taxableIncome*28)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax Amt"<<endl;
cout<<setw(15)<<15100<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(15100-61300)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(61300-123700)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<setw(15)<<(123700-188450)<<setw(15)<<28<<setw(15)<<(taxableIncome*28/100)<<endl;
cout<<" Filing status "<<" Married Filing Jointly "<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>188450&&taxableIncome<=336550){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100+(taxableIncome*28)/100+(taxableIncome*32)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax amt"<<endl;
cout<<setw(15)<<15100<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(15100-61300)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(61300-123700)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<setw(15)<<(123700-188450)<<setw(15)<<28<<setw(15)<<(taxableIncome*28/100)<<endl;
cout<<setw(15)<<(188450-336550)<<setw(15)<<32<<setw(15)<<(taxableIncome*32/100)<<endl;
cout<<" Filing status "<<" Married Filing Jointly"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else{
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100+(taxableIncome*28)/100+(taxableIncome*32)/100+(taxableIncome*40)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax amt"<<endl;
cout<<setw(15)<<15100<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(15100-61300)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(61300-123700)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<setw(15)<<(123700-188450)<<setw(15)<<28<<setw(15)<<(taxableIncome*28/100)<<endl;
cout<<setw(15)<<(188450-336550)<<setw(15)<<32<<setw(15)<<(taxableIncome*32/100)<<endl;
cout<<setw(15)<<336550<<setw(15)<<40<<setw(15)<<(taxableIncome*40/100)<<endl;
cout<<" Filing status "<<"Married Filing Jointly"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
break;
}
case 3:
{
if(taxableIncome<=7550){
taxAmt=taxableIncome+(taxableIncome*12)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax Amt"<<endl;
cout<<setw(15)<<7550<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<"Total Tax"<<setw(15)<<""<<setw(15)<<taxAmt<<endl;
cout<<" Filing status "<<" Married Filing Seperately"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>7550&&taxableIncome<=30650){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax amt"<<endl;
cout<<setw(15)<<7550<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(7550-30650)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<" Filing status "<<" Married Filing Seperately"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>30650&&taxableIncome<=61850){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax Amt"<<endl;
cout<<setw(15)<<7550<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(7550-30650)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(30650-61850)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<" Filing status "<<" Married Filing Seperately"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>61850&&taxableIncome<=94225){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100+(taxableIncome*28)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax Amt"<<endl;
cout<<setw(15)<<7550<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(7550-30650)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(30650-61850)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<setw(15)<<(61850-94225)<<setw(15)<<28<<setw(15)<<(taxableIncome*28/100)<<endl;
cout<<" Filing status "<<" Married Filing Seperately"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>94225&&taxableIncome<=168275){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100+(taxableIncome*28)/100+(taxableIncome*32)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax amt"<<endl;
cout<<setw(15)<<7550<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(7550-30650)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(30650-61850)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<setw(15)<<(61850-94225)<<setw(15)<<28<<setw(15)<<(taxableIncome*28/100)<<endl;
cout<<setw(15)<<(94228-168275)<<setw(15)<<32<<setw(15)<<(taxableIncome*32/100)<<endl;
cout<<" Filing status "<<" Married Filing Seperately"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else{
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100+(taxableIncome*28)/100+(taxableIncome*32)/100+(taxableIncome*40)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax amt"<<endl;
cout<<setw(15)<<7550<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(7550-30650)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(30650-61850)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<setw(15)<<(61850-94225)<<setw(15)<<28<<setw(15)<<(taxableIncome*28/100)<<endl;
cout<<setw(15)<<(94225-168275)<<setw(15)<<32<<setw(15)<<(taxableIncome*32/100)<<endl;
cout<<setw(15)<<168275<<setw(15)<<40<<setw(15)<<(taxableIncome*40/100)<<endl;
cout<<" Filing status "<<"Married Filing Seperately"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
break;
}
case 4:
{
if(taxableIncome<=10750){
taxAmt=taxableIncome+(taxableIncome*12)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax Amt"<<endl;
cout<<setw(15)<<10750<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<"Total Tax"<<setw(15)<<""<<setw(15)<<taxAmt<<endl;
cout<<" Filing status "<<" Head Of HouseHold"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>10750&&taxableIncome<=41050){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax amt"<<endl;
cout<<setw(15)<<10750<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(10750-41050)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<" Filing status "<<" Head Of HouseHold"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>41050&&taxableIncome<=106000){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax Amt"<<endl;
cout<<setw(15)<<10750<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(10750-41050)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(41050-106000)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<" Filing status "<<" Head Of HouseHold"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>106000&&taxableIncome<=171650){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100+(taxableIncome*28)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax Amt"<<endl;
cout<<setw(15)<<10750<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(10750-41050)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(41050-106000)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<setw(15)<<(106000-171650)<<setw(15)<<28<<setw(15)<<(taxableIncome*28/100)<<endl;
cout<<" Filing status "<<" Head Of HouseHold"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else if(taxableIncome>171650&&taxableIncome<=336550){
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100+(taxableIncome*28)/100+(taxableIncome*32)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax amt"<<endl;
cout<<setw(15)<<10750<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(10750-41050)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(41050-106000)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<setw(15)<<(106000-171650)<<setw(15)<<28<<setw(15)<<(taxableIncome*28/100)<<endl;
cout<<setw(15)<<(171650-336550)<<setw(15)<<32<<setw(15)<<(taxableIncome*32/100)<<endl;
cout<<" Filing status "<<" Head Of HouseHold"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
else{
taxAmt=taxableIncome+(taxableIncome*12)/100+(taxableIncome*16)/100+(taxableIncome*20)/100+(taxableIncome*28)/100+(taxableIncome*32)/100+(taxableIncome*40)/100;
cout<<setw(15)<<"Taxable Income Bracket"<<setw(15)<<"Tax Rate"<<setw(15)<<"Tax amt"<<endl;
cout<<setw(15)<<10750<<setw(15)<<12<<setw(15)<<(taxableIncome*12/100)<<endl;
cout<<setw(15)<<(10750-41050)<<setw(15)<<16<<setw(15)<<(taxableIncome*16/100)<<endl;
cout<<setw(15)<<(41050-106000)<<setw(15)<<20<<setw(15)<<(taxableIncome*20/100)<<endl;
cout<<setw(15)<<(106000-170650)<<setw(15)<<28<<setw(15)<<(taxableIncome*28/100)<<endl;
cout<<setw(15)<<(171650-336550)<<setw(15)<<32<<setw(15)<<(taxableIncome*32/100)<<endl;
cout<<setw(15)<<336550<<setw(15)<<40<<setw(15)<<(taxableIncome*40/100)<<endl;
cout<<" Filing status "<<" Head Of HouseHold"<<endl;
cout<<"Taxable Income $"<<taxableIncome<<endl;
cout<<"Tax Amount $"<<taxAmt<<endl;
}
break;
}
default:
cout<<"Invalid Operation"<<endl;
}
cout<<"Enter status code to continue"<<endl;
cin>>statusCode;
}while(statusCode==1||statusCode==2||statusCode==3||statusCode==4);
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.