Computer Science, asked by Subhrajeet2006, 5 months ago

Write a bluej program to input the name and basic salary of an employee,calculate the dearness allowance if basic salary is more than 15000 then dearness allowance is 25 percent of basic salary otherwise 15 percent of basic salary.Show the total salary of the employee.

Total salary = basic salary + deaŕness allowance​

Answers

Answered by nisha263248
2

Answer:

import java.util.*;

class salary

{

public static void main()

{

Scanner sc=new Scanner(System.in);

int salary,DA,Total salary;

System.out.println("Enter the salary");

salary=sc.nextInt();

if(salary>=15000)

{

DA=0.25*salary;

}

else

{

DA=0.15*salary;

}

Total salary =salary+DA;

}

}

Similar questions