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
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
0
scroll up for the answers
Similar questions
Physics,
1 month ago
Math,
1 month ago
English,
10 months ago
Social Sciences,
10 months ago
Business Studies,
10 months ago