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

Popular posts from this blog

the distance between two cities (in km is input through the keyboard. write a program to convert and print this distance in meter ,feet inches and centimeter.

CREATE UNIT CONVERTER APP

write a program to check whether a triangle is valid or not, when the threeangles of the triangle are entered through the keyboard. A triangle is valid if the sumof all the three angles is equal to 180 degrees