1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
|
#include <iostream>
#include <string>
using namespace std;
void tax1(); void tax2();void tax3();void tax4();void tax5();void tax6();void tax7();void tax8();
char ans1,ans2,status;
int Single=9000;
int Married=18000;
int Head=12000;
double grossinc,exemption,taxinc,dependents1,dependents2;
string name;
string tin;
int main()
{
cout<<"\t\t\t=====TAX COMPUTATION=====\n\n\n";
cout<<"Enter your Name: ";
cin>>name;
cout<<"Enter your TIN (Tax Identification Number) : ";
cin>>tin;
cout<<"Enter your Gross Income: Php ";
cin>>grossinc;
cout<<"Civil Status: \t\t[S]Single\n\t\t\t[M]Married\n\t\t\t[H]Head Of The Family\nEnter your Civil Status: ";
cin>>status;
if (status == 'S' || status == 's')
{
exemption = Single ;
taxinc = grossinc-exemption;
if(taxinc <=2500.00) tax1();
else if(taxinc>2500.00 && taxinc <=5000.00)tax2();
else if(taxinc>5000.00 && taxinc <=10000.00)tax3();
else if(taxinc>10000.00 && taxinc <=20000.00)tax4();
else if(taxinc>20000.00 && taxinc <=40000.00)tax5();
else if(taxinc>40000.00 && taxinc <=60000.00)tax6();
else if(taxinc>60000.00 && taxinc <=100000.00)tax7();
else if(taxinc>100000.00)tax8();
}
else if (status == 'M' || status == 'm')
{
cout<<"Do you have any dependents? [Y/N]: ";
cin>>ans1;
}
else if (ans1 == 'Y' || ans1 == 'y')
{
cout<<"How many dependents?: ";
cin>>dependents1;
if(dependents1 >=1 && dependents1 <=4)dependents2=dependents1*8000;
else if( dependents1 >4 ) dependents2= 4*8000;
exemption = Married + dependents2; taxinc = grossinc-exemption;
if(taxinc <=2500.00) tax1();
else if(taxinc>2500.00 && taxinc <=5000.00)tax2();
else if(taxinc>5000.00 && taxinc <=10000.00)tax3();
else if(taxinc>10000.00 && taxinc <=20000.00)tax4();
else if(taxinc>20000.00 && taxinc <=40000.00)tax5();
else if(taxinc>40000.00 && taxinc <=60000.00)tax6();
else if(taxinc>60000.00 && taxinc <=100000.00)tax7();
else if(taxinc>100000.00)tax8();
}
else if ( ans1 == 'N' || ans1 == 'n')
{
cout<<"Okay then, let us proceed to the next step.";
}
else if ( status == 'H' || status == 'h')
{
cout<<"Do you have any dependents? [Y/N]: ";
cin>>ans1;
}
else if (ans1 == 'Y' || ans1 == 'y')
{
cout<<"How many dependents?: ";
cin>>dependents1;
if(dependents1 >=1 && dependents1 <=4)dependents2=dependents1*8000;
else if( dependents1 >4 ) dependents2= 4*8000;
exemption = Head + dependents2; taxinc = grossinc-exemption;
if(taxinc <=2500.00) tax1();
else if(taxinc>2500.00 && taxinc <=5000.00)tax2();
else if(taxinc>5000.00 && taxinc <=10000.00)tax3();
else if(taxinc>10000.00 && taxinc <=20000.00)tax4();
else if(taxinc>20000.00 && taxinc <=40000.00)tax5();
else if(taxinc>40000.00 && taxinc <=60000.00)tax6();
else if(taxinc>60000.00 && taxinc <=100000.00)tax7();
else if(taxinc>100000.00)tax8();
}
else if ( ans1 == 'N' || ans1 == 'n')
{
cout<<"Okay then, let us proceed to the next step.";
}
else
{
cout<<"Please choose the exact civil status so i can proceed.";
}
cout<<"Do you want to try my TAX COMPUTATION again? [Y/N]: ";
cin>>ans2;
if ( ans2 == 'N' || ans2 == 'n')
{
cout<<" THANK YOU VERY MUCH FOR USING MY TAX COMPUTATION PROGRAM!\n"
<<" I HOPE TO SEE YOU SOON! GRACIAS DE NUEVO!\n\n\n\n";
}
system("pause");
}
void tax1()
{
cout<<"The Total Exemption is : Php "<<exemption<<endl
<<"The Taxable Income is : Php "<<taxinc<<endl
<<"And your TAX DUE is 0%\n";
}
void tax2()
{
cout<<"The Total Exemption is : Php "<<exemption<<endl
<<"The Taxable Income is : Php "<<taxinc<<endl
<<"And your TAX DUE is 1%\n"
<<"All in all , your TAX is: Php "<<taxinc*0.01<<endl;
}
void tax3()
{
cout<<"The Total Exemption is : Php "<<exemption<<endl
<<"The Taxable Income is : Php "<<taxinc<<endl
<<"And your TAX DUE is Php 25.00 + 3% of the taxable income\n"
<<"All in all , your TAX is: Php "<<(taxinc*0.03)+25.00<<endl;
}
void tax4()
{
cout<<"The Total Exemption is : Php "<<exemption<<endl
<<"The Taxable Income is : Php "<<taxinc<<endl
<<"And your TAX DUE is Php 175.00 + 7% of the taxable income\n"
<<"All in all , your TAX is: Php "<<(taxinc*0.07)+175.00<<endl;
}
void tax5()
{
cout<<"The Total Exemption is : Php "<<exemption<<endl
<<"The Taxable Income is : Php "<<taxinc<<endl
<<"And your TAX DUE is Php 875.00 + 11% of the taxable income\n"
<<"All in all , your TAX is: Php "<<(taxinc*0.11)+875.00<<endl;
}
void tax6()
{
cout<<"The Total Exemption is : Php "<<exemption<<endl
<<"The Taxable Income is : Php "<<taxinc<<endl
<<"And your TAX DUE is Php 3,075.00 + 15% of the taxable income\n"
<<"All in all , your TAX is: Php "<<(taxinc*0.15)+3,075.00<<endl;
}
void tax7()
{
cout<<"The Total Exemption is : Php "<<exemption<<endl
<<"The Taxable Income is : Php "<<taxinc<<endl
<<"And your TAX DUE is Php 6,075.00 + 19% of the taxable income\n"
<<"All in all , your TAX is: Php "<<(taxinc*0.19)+6,075.00<<endl;
}
void tax8()
{
cout<<"The Total Exemption is : Php "<<exemption<<endl
<<"The Taxable Income is : Php "<<taxinc<<endl
<<"And your TAX DUE is Php 13,675.00 + 24% of the taxable income\n"
<<"All in all , your TAX is: Php "<<(taxinc*0.24)+13,675.00<<endl;
}
|