Saturday, 17 December 2016

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

Problem :- Write A C Program For Find The Gross Salary Of An Employee .gross salary is different form 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. 

See Also :- C Program For Find The Gross Salary Of An Employee

Logic :- For find a gross salary of Employee we need to calculate DA and HRA Then Sum Of Basic Salary + HRA + DA. after calculate the sum Print The Sum. 

Solution :-

#include<iostream>
using namespace std;
int main()
{
          /* Program By Ghanendra Yadav
  Visit http://www.programmingwithbasics.com/
  */
 
  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);

}

See Also :- Java Program For Find The Gross Salary Of An Employee


Output:-


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




No comments:
Write comments

Recommended Posts × +