Write a c++ application that computes gross salary for Mr.A,given that during the interview session and before started work, it was agreed that his hourly wage would be Ghs 47. Assume that he worked for 387 hrs and he resigned. Compute also his Net salary given the under listed information:
Taxes. Value. Tax1. 4.7%ofgross. Tax2. Gh 87. Tax3. 3.2% ofgross. Tax4. Gh 3. Tax5. 0.4 of gross.

Given that extra dispensation is given to employees in the form of bonuses. Compute the take home pay from the table below.




Net salary. Bonus.

0-10. 5% of net value.
11-500. 10% of net value
501-1000. Ghs 500
1001-2000. Ghs 600
Above 2000. 5% of net salary

Respuesta :

Answer:

# include <iostream>

using namespace::std;

int main()

{   int hours;

float hourly_rate= 47;

double net_Sal;

float tax1;

float tax2;

float tax3;

float tax4;

float tax5;

double gross_Pay;

float bonus;

   cout<<"Enter net hours worked";

   cin>>hours;

   net_Sal= 47 * 387;

       tax1 = (4.7 * net_Sal)/100;

       tax2= 87;

       tax3=(3.7 * net_Sal)/100;

       tax4=3;

       tax5=(0.47 * net_Sal)/100;

       gross_Pay= net_Sal- tax1 - tax2 -tax3 - tax4 - tax5;

       float temp=gross_Pay;                  

       double in_hand;

       if (gross_Pay<10)

       {

           bonus= (5 * gross_Pay)/100;

           in_hand=gross_Pay+bonus;

           gross_Pay=gross_Pay-gross_Pay;

       }

       else if (gross_Pay>10 ||gross_Pay<500)

       { bonus= (10 * gross_Pay)/100;

         temp=gross_Pay-gross_Pay;

         in_hand=in_hand+bonus;

       }

       else if (gross_Pay>500|| gross_Pay<1000)

       { bonus= 500;

         gross_Pay=gross_Pay-gross_Pay;

         in_hand=in_hand+bonus;

       }

       else if (gross_Pay>1000 || gross_Pay<=2000)

       { bonus= 600;

         gross_Pay=gross_Pay-gross_Pay;

         in_hand=in_hand+bonus;

       }

       else if (gross_Pay>2000)

       { bonus= (5 * gross_Pay)/100;

         gross_Pay=gross_Pay-gross_Pay;

         in_hand=in_hand+bonus;

       }

        cout<<"in hand="<<in_hand;

        return 0;

}

Explanation:

Please check the answer section. The only complex part of this question is number of variables, and if loop conditional statements.