package com.company;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// write your code here
float salary,Da,Hr,allowance,TotalDaHr,grossSalary;
Scanner Salary = new Scanner(System.in);
System.out.print("Ramesh Enter your basic Salary : ");
salary = Salary.nextFloat();
System.out.print("Enter Your dearness allowance(in %) : ");
Da = Salary.nextFloat();
System.out.print("Enter your house rent(in %) : ");
Hr = Salary.nextFloat();
allowance = Da+Hr;
TotalDaHr = (allowance/100) * salary;
grossSalary = salary-TotalDaHr;
float Dm,Hm;
Dm = (Da/100)*salary;
Hm = (Hr/100)*salary;
System.out.println("Ramesh Dearness allowance(in Rupee) : "+Dm);
System.out.println("Ramesh House rent (in Rupee) : "+Hm);
System.out.println("Ramesh Gross Salary is : "+grossSalary);
}
}
Ramesh Enter your basic Salary : 555000 Enter Your dearness allowance(in %) : 12 Enter your house rent(in %) : 10 Ramesh Dearness allowance(in Rupee) : 66600.0 Ramesh House rent (in Rupee) : 55500.0 Ramesh Gross Salary is : 432900.0 Process finished with exit code 0
Comments
Post a Comment