Programming Problems

Discussion in 'Computer Support' started by evilonez_13, Aug 20, 2012.

  1. evilonez_13

    evilonez_13

    Joined:
    Aug 20, 2012
    Messages:
    1
    Please help me out with this c++ program?
    Personal Deductions:
    Single = Php 9, 000.00
    Head of the Family = Php 12, 000.00
    Married = Php 18, 000.00
    Additional Deduction / Exemption:
    Php 8, 000.00 / dependent
    Note: Maximum of four (4) dependents
    TAX TABLE
    TAXABLE INCOME TAX DUE
    <= 2, 500.00 0%
    > 2, 500.00 && <= 5, 000.00 1%
    > 5, 000.00 && <= 10, 000.00 Php 25.00 + 3% of excess over Php 5,000.00
    > 10, 000.00 && <= 20, 000.00 Php 175.00 + 7% of excess over Php 10,000.00
    > 20, 000.00 && <= 40, 000.00 Php 875.00 + 11% of excess over Php 20,000.00
    > 40, 000.00 && <= 60, 000.00 Php 3, 075.00 + 15% of excess over Php 40,000.00
    > 60, 000.00 && <= 100,000.00 Php 6, 075.00 + 19% of excess over Php 60, 000.00
    > 100, 000.00 Php13,675.00 + 24% of excess over Php 100,000.00

    INPUT REQUIREMENT:
    1. Name of Taxpayer
    2. TIN (Tax Identification Number)
    3. Gross Income (Annual Income)
    4. Civil Status (Single, Married, or Head of the Family)
    5. Number of Dependents
    PROCESS:
    1. Get the name of Taxpayer, his/her TIN and Gross Income.
    2. Get the Civil Status
    3. If Civil_Status != “Single”, get the number of dependents.
    4. Compute for the taxable income.
    a. Taxable Income = Gross Income – Total Exemption
    b. Total Exemption = Personal Deduction + Additional Exemption
    5. Get the tax due.
    PROGRAM SPECIFICATION:
    1. Include necessary validation codes.
    2. Use at least three (3) functions.
    a. To get the Personal Deduction.
    b. To get the Additional Exemption.
    c. To get the tax due.
    3. Use a loop. This would allow the user to execute the program as many times as the user wants to.
    and this is all i can do..
    #include <iostream>
    #include <stdlib.h>
    using namespace std;
    int Personal_Deductions (void);
    int Additional_Deductions (void);
    int Total_Exemption (void);
    int Taxable_Income (void);
    int Tax_Due (void);

    int main()
    {
    char Fname[10],Lname[10],Cstatus;
    int TIN,Gincome,Ndependents,TaxableIncome,Ta…
    cout<<"Enter your first name name:"<<endl;
    cin>>Fname;
    cout<<"Enter your last name name:"<<endl;
    cin>>Lname;
    cout<<"Enter your TIN number"<<endl;
    cin>>TIN;
    cout<<"Enter your Gross Income"<<endl;
    cin>>Gincome;
    cout<<"Civil Status"<<endl;
    cin>>Cstatus;
    if (Cstatus == 'M' || 'm' || 'H' || 'h')
    {
    cout<<"Number of Dependents: (1-4)"<<endl;
    cin>>Ndependents;
    Personal_Deductions();
    }
    cout<<"Gross Income:"<<Gincome;
    cout<<""<<endl;
    Additional_Deductions();
    cout<<"Gross Income with Dependents:"<<Gincome;
    cout<<""<<endl;
    Total_Exemption();
    cout<<"Total Exemption:"<<Gincome;
    cout<<""<<endl;
    Taxable_Income();
    cout<<"Taxable Income:"<<TaxableIncome<<endl;
    Tax_Due();
    cout<<"Tax Due is:"<<TaxDue<<endl;
    else
    {
    cout<<"Wrong Input";
    }
    system("pause");
    }
    int Personal_Deductions (void)
    {
    int Cstatus,Gincome;
    if (Cstatus=='s' || Cstatus=='S')
    {
    Gincome=Gincome-9000;
    }
    else if(Cstatus=='h' || Cstatus=='H')
    {
    Gincome=Gincome-12000;
    }
    else if(Cstatus=='m' || Cstatus=='M')
    {
    Gincome=Gincome-18000;
    }
    return(Gincome);
    }
    int Additional_Deductions (void)
    {
    int Ndependents,Gincome,num;
    num=Ndependents*8000;
    Gincome=Gincome-num;
    return(Gincome);
    }
    int Total_Exemption (void)
    {
    int Gincome,TotalExemption;
    TotalExemption=Gincome+Gincome;
    return(Gincome);
    }
    int Taxable_Income (void)
    {
    int TaxableIncome,Gincome;
    TaxableIncome=Gincome-Gincome;
    return(Gincome);
    }
    int Tax_Due (void)
    {
    double TaxableIncome,TaxDue;
    if (TaxableIncome<=2500)
    {
    TaxDue=TaxableIncome*0.0;
    cout<<"Tax Due is:"<<TaxDue<<endl;
    }
    else if(TaxableIncome>2500 && TaxableIncome<=5000)
    {
    TaxDue=TaxableIncome*0.01;
    cout<<"Tax Due is:"<<TaxDue<<endl;
    }
    else if (TaxableIncome>5000 && TaxableIncome<=10000)
    {
    TaxDue=TaxableIncome-5000+25+0.03;
    cout<<"Tax due is:"<<TaxDue<<endl;
    }
    else if (TaxableIncome>10000 && TaxableIncome<=20000)
    {
    TaxDue=TaxableIncome-10000+175+0.07;
    cout<<"Tax due is:"<<TaxDue<<endl;
    }
    else if (TaxableIncome>20000 && TaxableIncome<=40000)
    {
    TaxDue=TaxableIncome-20000+875+0.11;
    cout<<"Tax due is:"<<TaxDue<<endl;
    }
    else if (TaxableIncome>40000 && TaxableIncome<=60000)
    {
    TaxDue=TaxableIncom
     
    evilonez_13, Aug 20, 2012
    #1
    1. Advertising

  2. evilonez_13

    SunnyWay

    Joined:
    Sep 13, 2012
    Messages:
    3
    I think that you should finish it yourself.
     
    SunnyWay, Sep 13, 2012
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Howard

    Wireless PEAP/MSCHAPV2 client programming question

    Jim Howard, Jun 28, 2005, in forum: Wireless Networking
    Replies:
    6
    Views:
    1,697
    Arkady Frenkel
    Jul 2, 2005
  2. cameron

    XSLT programming

    cameron, Jan 4, 2004, in forum: Firefox
    Replies:
    0
    Views:
    518
    cameron
    Jan 4, 2004
  3. Mark  Chen
    Replies:
    0
    Views:
    692
    Mark Chen
    Mar 24, 2005
  4. rgarvind

    Regarding perl programming. How 2 make HTTP request?

    rgarvind, Jan 10, 2005, in forum: Microsoft Certification
    Replies:
    1
    Views:
    707
  5. ed
    Replies:
    6
    Views:
    2,295
    News Account
    Jun 23, 2004
Loading...

Share This Page