Q:

C++ Program For Find The Gross Salary Of An Employee

belongs to collection: Simple Programs in C++ Programming

0

 Write A C++ Program For Find The Gross Salary Of An Employee. Gross salary is different from Net, Salary gross salary calculated annual basis we can calculate a gross salary by using the following formula (Gross salary = Net Salary - Deduction. ). 


Deduction = Tax ( HRA. + DA. + MA. ).


Formula's :- 

                      Gross Salary = Basic + Da + Hra + Ma. 
                      Deduction = Gross Salary - Pf - Pt - It. 
                      Net Salary = Gross Salary - Deduction. 

Logic:-

 For finding a gross salary of Employee we need to calculate DA and HRA then Sum Of Basic Salary + HRA + DA. after calculating the sum print the sum. So basically first we calculate a DA, and HRA after that we add basic salary + HRA +DA  so, in this way, we can find the Gross salary of an employee.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include<iostream>
using namespace std;
int main()
{
  
    float GrossPayment,basic,da,hra,da1,hra1;

    cout<<" Enter basic salary : ";
    cin>>basic;

   
    cout<<" Enter DA : ";
    cin>>da1;

    cout<<" Enter HRA : ";
    cin>>hra1;


    da = (da1 * basic) / 100;
    hra = (hra1 * basic) / 100;

    GrossPayment = basic + da + hra;

    cout<<"\n Gross Salary :"<<GrossPayment<<endl;;
    return (0);

}

 

Output:

 Enter basic salary : 48550

 Enter DA : 6

 Enter HRA : 10

 Gross Salary :56318

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ Program For Calculate Percentage Of More Than... >>
<< C++ Program To Find Greater Number. Among Given Th...