Program Using-Scanner class
Write a program by using class ‘Employee’ to accept Basic pay of an employee.Calculate the allowance/deduction as given below.Finally find and print the Gross and Net pay.
Dearness Allowance(DA) :30% of Basic pay
House Rent Allowance(HRA) :15%of Basic pay
Provident Fund(PF) : 12.5% of Basic pay
Gross Pay =Basicpay+DA+HRA
Net Pay= Gross Pay-PF
Answers
Answered by
7
Answer:
a program is java:-
public class employee
{
public static void main(double salary)
{
Double allowance= 30/100*salary;
Double rent = 15/100* salary,
Double pf= 12.5/100* salary,
double gross= salary+allowance+rent,
double net=salary - pf
System.out.printin("gross pay=Rs."+net)'
}
}
Hope it helps you
Mark as Branliest and follow me on
Answered by
2
try this online Java compilers
Attachments:
Similar questions
English,
4 months ago
Math,
4 months ago
Computer Science,
4 months ago
Math,
9 months ago
Math,
1 year ago