Computer Science, asked by sushmitasoren5808, 1 month ago

wap in java to accept employee number, name,basic pay,dearness allowance,provident fund ,income tax for n number of employees.Calculate gross pay, gross deduction and net pay.Print employee number, name , gross pay,pay deduction and net pay​

Answers

Answered by saralagowda70900
1

Answer:

import java.util.Scanner;

public class Employee

{

public static void main(String args[]) {

Scanner in = new Scanner(System.in);

System.out.print("Enter Basic Pay: ");

double bp = in.nextDouble();

double da = 0.3 * bp;

double hra = 0.15 * bp;

double pf = 0.125 * bp;

double gp = bp + da + hra;

double np = gp - pf;

System.out.println("Gross Pay = " + gp);

System.out.println("Net Pay = " + np);

}

}

Similar questions