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 hrs;

float hrly_rate= 47;

double net_Sl;

float t1;

float t2;

float t3;

float t4;

float t5;

double grss_Pay;

float bons;

   cout<<"Enter number of hours worked";

   cin>>hrs;

   net_Sl= 47 * 387;

       t1 = (4.7 * net_Sl)/100;

       t2= 87;

       t3=(3.7 * net_Sl)/100;

       t4=3;

       t5=(0.47 * net_Sl)/100;

       grss_Pay= net_Sl- t1 - t2 -t3 - t4 - t5;

       float tmp=grss_Pay;                  

       double in_hnd;

       if (grss_Pay<10)

       {

           bons= (5 * grss_Pay)/100;

           in_hnd=grss_Pay+bons;

           grss_Pay=grss_Pay-grss_Pay;

       }

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

       { bons= (10 * grss_Pay)/100;

         tmp=grss_Pay-grss_Pay;

         in_hnd=in_hnd+bons;

       }

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

       { bons= 500;

         grss_Pay=grss_Pay-grss_Pay;

         in_hnd=in_hnd+bons;

       }

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

       { bons= 600;

         grss_Pay=grss_Pay-grss_Pay;

         in_hnd=in_hnd+bons;

       }

       else if (grss_Pay>2000)

       { bons= (5 * grss_Pay)/100;

         grss_Pay=grss_Pay-grss_Pay;

         in_hnd=in_hnd+bons;

       }

        cout<<"Final Salary"<<in_hnd;

        return 0;

}

Explanation:

Please check the answer section.