class Payroll {
public static void main(String[] args) {
int empNo= 1234;
double basic = 15000;
int att = 30;
double daPercentage = 30.0/100;
int residence_type =0;
double cmhra,cmbasic,cmda;
double tax,netsal,grosssal;
cmbasic = basic/30*att;
cmda = cmbasic*daPercentage;
if(residence_type == 0)
cmhra = 0;
else if(residence_type == 1)
cmhra =((basic)*0.1);
else
cmhra = ((basic)*0.15);
grosssal = (cmbasic+cmhra+cmda);
tax = ((grosssal)*0.1);
netsal = (grosssal - tax);
System.out.println("The salary of the employee = " +netsal );
}
}
Java Program For Payroll
March 02, 2015
By:
Bhanu Namikaze
Bhanu Namikaze
Bhanu Namikaze is an Penetration Tester, Red Teamer, Ethical Hacker, Blogger, Web Developer and a Mechanical Engineer. He Enjoys writing articles, Blogging, Debugging Errors and CTFs. Enjoy Learning; There is Nothing Like Absolute Defeat - Try and try until you Succeed.

No comments:
Post a Comment