Q:

Java Program For Find The Gross Salary of an Employee

0

Calculate gross salary in Java or Calculate Net Salary Calculate Gross salary Deduction or Program To Calculate And Display Employee Salary or Java Program to Calculate Salary of an Employee or 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

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.in);

  System.out.println("Enter Basic Salary Of Employee: ");
  basic_salary=scan.nextFloat();

  System.out.println("Enter Basic DA Of Employee: "); 
  da1=scan.nextFloat();
 
  System.out.println("Enter Basic HRA Of Employee: ");
  hra1=scan.nextFloat();

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

  GrossPayment = basic_salary + da + hra;

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

 

Output:

Enter Basic Salary Of Employee: 

45600

Enter Basic DA Of Employee: 

10

Enter Basic HRA Of Employee: 

12

Gross Salary Of Employee: 55632.0

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

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now