class netsalary
{
public static void main(String args[])
{
float basic_pay = 19653,
da = basic_pay*20/100,
hra = basic_pay*15/100,
pf = basic_pay*10/100,
income_tax = basic_pay*10/100,
gross_salary = basic_pay+da+hra,
deductions = pf+income_tax,
net_salary = gross_salary-deductions;
System.out.println("gross salary :"+gross_salary+
"\ndeductions :"+deductions+
"\nnet salary :"+net_salary);
}
}
output :
gross salary :26531.549
deductions :3930.6
net salary :22600.95
{
public static void main(String args[])
{
float basic_pay = 19653,
da = basic_pay*20/100,
hra = basic_pay*15/100,
pf = basic_pay*10/100,
income_tax = basic_pay*10/100,
gross_salary = basic_pay+da+hra,
deductions = pf+income_tax,
net_salary = gross_salary-deductions;
System.out.println("gross salary :"+gross_salary+
"\ndeductions :"+deductions+
"\nnet salary :"+net_salary);
}
}
output :
gross salary :26531.549
deductions :3930.6
net salary :22600.95