Employee Salary

No Comment - Post a comment

/* Simple Java Program For Deciding Employee Salary Depending On His Designation*/

class Salary2
{
public static void main(String args[])
{
float gross,bs,hre,da;
bs = Integer.parseInt(args[0]);

if(bs >15000)
{
hre = 0.3f* bs;
da = 0.2f*bs;
gross = bs + hre + da;
System.out.println("Gross Salary : "+ gross);
}
else if(bs >10000)
{
hre = 0.4f* bs;
da = 0.3f*bs;
gross = bs + hre + da;
System.out.println("Gross Salary : "+ gross);
}
else if(bs >5000)
{
hre = 0.3f* bs;
da = 0.2f*bs;
gross = bs + hre + da +500;
System.out.println("Gross Salary : "+ gross);
}
}
}

 
This Post has No Comment Add your own!

Post a Comment