input the name, age, and basic salary of an employee. calculate the total salary of the employees as per the given conditions if Age<40 HRA 5%, DA 10%. if age is between 40 to 50 then HRA 7% DA 12%
if you give the wrong answer I will delete it and report you
Answers
Answered by
0
Explanation:
import java.util.Scanner ;
class java {
void main (int a , int salary) {
Scanner sc = new Scanner (System.in);
System. out. print ("Enter the value of a and salary " ) ;
int a1 = sc. nextInt( );
int HRA, int DA ;
if (a < 40 )
HRA = 5 * salary /100;
DA = 10 * salary /100 ;
if (a > 40 && a < 50 )
HRA = 7 * salary / 100 ;
DA = 12 * salary / 100 ;
System. out. print ("HRA" + " " + "DA")
}}
Similar questions
Computer Science,
8 days ago
Science,
16 days ago
English,
16 days ago
Physics,
9 months ago
Chemistry,
9 months ago
Environmental Sciences,
9 months ago