Sunday, 18 December 2016

Java Program For Find The Gross Salary of an Employee

Problem:- 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. ).


Check This:- Hacker rank solution for C++ Domain.


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.



Java Program For Find The Gross Salary Of An Employee



import java.util.Scanner;
/* Program By Ghanendra Yadav
    Visit http://www.programmingwithbasics.com/
*/
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);
  }
}

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

Output:-

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

2 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

    ReplyDelete
    Replies
    1. Thanks For Writing For Us

      Click Here For Your Solution Click Here

      Delete