Computer Science, asked by ayush5473, 11 months ago

write a program in java to input name and basic salary of an employee. Calculate and display the gross salary and net salary when : da = 30% of basic, hra = 12.5% of basic, pf = 10% of basic, gross= basic+ da+ hra, net pay = gross - pf​

Answers

Answered by Shrijitapal
67

Answer:

hope this helps ....mark me as brainliest

Attachments:
Answered by SaurabhJacob
13

The program in JAVA,

public class emp

{

public static void main(string args[]){

scanner sc = new scanner(system.in);

system.out.println("Enter the name of employee = ");

string name = in.next();

system.out.println("Enter the basic salary = ");

int sal = in.nextint();

double da, hra, pf, gp, np;

da = 0.3*sal;

hra = 0.125*sal;

pf = 0.10*sal;

gp = sal+da+hra;

np = gp-pf;

system.out.println("Gross salary"+gp);

system.out.println("Net salary"+np);

}

}

Similar questions