Sunday, 18 December 2016

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


import java.util.Scanner;
class employeesalary
public static void main(String args[]) 
float basic_salary,da,hra,da1,hra1,GrossPayment;

Scanner scan=new Scanner(;

System.out.println("Enter Basic Salary Of Employee: ");

System.out.println("Enter Basic DA Of Employee: ");

System.out.println("Enter Basic HRA Of Employee: ");

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

      GrossPayment = basic_salary + da + hra;

      System.out.println("Gross Salary Of Employee: "+GrossPayment);



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


Java Program For Find The Gross Salary Of An Employee

You May Like This:-

Write comments
  1. write a code in java that input salary and grade of an employee and apply below conditions:
    i) in case of grade 15 or above than bonus is 15%
    ii) in case of grade 16 or above than bonus is 20%
    iii) in case of grade 18 or above than bonus is 25%
    iv) after calculating total salary deduct 13% GST in case that salary is 15000 or above. deduct 15% GST and in case that salary is 22000 or above.
    v) Add 6% bonus at the end
    Calculate net salary according to above condition and display it.

    Give me solution of this question I need emergency solution of this question. Thanks

    1. Thanks For Writing For Us

      Click Here For Your Solution Click Here

  2. Hi just wanted to give you a brief heads up and let you know a few of the pictures aren't loading correctly. I'm not sure why but I think its a linking issue. I've tried it in two different web browsers and both show the same outcome. paypal login


Recommended Posts × +