Computer Science, asked by rushilansari, 9 months ago

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 atharv2303
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 kushal4468
2

try this online Java compilers

Attachments:
Similar questions