Monday, 7 March 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 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. ).

Check This:- Hacker rank solution for Strings, Classes, STL, Inheritance in C++.

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 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.

Also Check:- Geeksforgeeks solution for School, Basic, Easy, Medium, Hard in C++.

Solution:-

#include<stdio.h>

int main()
{
          /* Program By Ghanendra Yadav
  Visit http://www.programmingwithbasics.com/
  */
 
  float GrossPayment,basic,da,hra,da1,hra1;

  printf("Enter basic salary : ");
  scanf("%f", &basic);

   
  printf("Enter DA : ");
  scanf("%f", &da1);

  printf("Enter HRA : ");
  scanf("%f", &hra1);


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

  GrossPayment = basic + da + hra;

  printf("\nGross Salary :%f\n",GrossPayment);
  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

You May Like This:-

Extreme Recommended:- Like our Facebook Page or Join our Facebook Group and Google plus Community for up-to-date. If you have any Query or Question you can ask in the group, I will Try To Solve your Query and try to answers of your Questions withing 24 Hours, You can also Email me or comment below Please suggest to your Friends to join and like our page and don't forget to Subscribe. Enter your Email and click to subscribe.

Ghanendra Yadav

Ghanendra Yadav

Hello, I Am Ghanendra Yadav Owner of This Blog, I am professional Blogger and Programmer. I Love Programming, Logo Making, And Banner Designing. My Highest Qualification is MCA From NIT Warangal. You Can Find Me On Social Media Through Below Link And If You Have Any Query Related To Programming And Other Subject Comment Below or You Can Mail Me I Will Try To Answer Within 24 Hours Email:- yghanendra@student.nitw.ac.in

Find me on Social Media

Facebook | Twitter | Google+ | RSS Feed

No comments:

Post a Comment