Computer Science, asked by lathasp85, 2 months ago

Write a class to with name employee and basic as its data member to find the gross pay of an employee for the following allowance and deduction use meaningful variables
Dearness allowance =25% of the basic pay

Answers

Answered by tamannaclasses
6

Explanation:

import jave.i0.*;

public class employee

{

public static void main (string args [ ]) throws IO Exception

{

int basic; double bra da, pf, n pay,gross;

gross = 0

Input Stream Reader read = new Input Stream Reader (System.in);

Buffered Reader in = new Buffered Reader (read);

System.out.printIn (“Enter basic salary”);

basic = Integer.parseInt (in.read Line ( ));

da = basic * 25/100

hra = basic * 15/100

pf = basic * 8.33/100;

npay = da + hra + basics; gross = npay – pf;

System.out.printIn (“The net pay =” + npay);

System.out.printIn (“The gross pay =” + gross);

}

}

please mark as brainliest

Answered by AllSideGamers
0

scroll up for the answers

Similar questions