Sie sind auf Seite 1von 2

#include <iostream>

002 #include <stdio.h>


003
004 double Calculate_Federal_Tax( double earnings, double deductions );
005 double Calculate_State_Tax( double Federal_Tax );
006 double Calculate_Federal_Refund ( double Federal_Tax, double Federal_WH
);
007 void Print_Header();
008 void Print_Customer_Record( int Customer_ID, double income, double deduc
tions,
009 double Federal_Tax, double Federal_WH, doubl
e State_WH, double Federal_Refund );
010
011 using namespace std;
012
013 int main( )
014 {
015
016 int Customer_ID;
017 {
018 cout << "Please enter your customer id:";
019 cin >> Customer_ID;
020 }
021
022 double earnings;
023 {
024 cout << "What is the salary of the employee?: ";
025 cin >> earnings;
026 }
027 double Federal_WH;
028 {
029 cout << "Please enter your federal taxes withheld:";
030 cin >> Federal_WH;
031 }
032 double State_WH;
033 {
034 cout << "Please enter your state taxes witheld:";
035 cin >> State_WH;
036 }
037 double Deductions;
038 {
039 cout << "Please enter your amount of tax deductions:";
040 cin >> Deductions;
041 }
042
043
044 double Caculate_Federal_Tax ( double earnings, double deductions);
045 {
046 double Federal_Tax;
047
048 if(earnings>=40000)
049 {
050 Federal_Tax=earnings*30/100;
051
052 }
053 else if(earnings>=20001 && earnings<=40000)
054 {
055 Federal_Tax=earnings*20/100;
056
057 }
058 else if(earnings>=10001 && earnings<=20000)
059 {
060 Federal_Tax=earnings*15/100;
061
062 }
063
064 double Calculate_State_Tax ( double Federal_Tax );
065 {
066 double State_Tax;
067
068 if(earnings>=40000)
069 {
070 State_Tax=earnings*30/100*0.07;
071
072 }
073 else if(earnings>=20001 && earnings<=40000)
074 {
075 State_Tax=earnings*20/100*0.07;
076
077 }
078 else if(earnings>=10001 && earnings<=20000)
079 {
080 State_Tax=earnings*15/100*0.07;
081
082
083 }
084
085
086 double Calculate_Federal_Refund ( double Federal_Tax, double Federal_WH)
;
087 {
088 double Federal_Refund;
089
090 Federal_Refund = Federal_Tax - Federal_WH;
091
092
093
094 }
095
096
097 cout << "The federal tax of the employee is: " << Federal_Tax << endl;
098 cout << "your state tax is: " << State_Tax << endl;
099
100
101
102
103
104 system("pause");

Das könnte Ihnen auch gefallen