Computer Science, asked by amaanjaved1184, 1 day ago

write a program to accept the basic pay from the user the employee is given 30% of the basic pay and da as15% of the basic pay as hra .now calculate the gross pay paid to the employee

Answers

Answered by DeblinaDutta
0

Explanation:

import java.util.Scanner;

public class employee

{

public static void main()

{

Scanner in = new Scanner(System.in);

System.out.println("enter the basic pay");

long bsp = in.nextLong();

double da = (30 * bsp) / 100;

double hra = (15 * bsp) / 100;

double gpay = hra + da + bsp;

System.out.println("gross pay of that employee is = "+gpay);

}

}

Similar questions