write a program in Java to accept the salary of an employee and add 15% to it
Answers
Answered by
2
I written on paper........
Attachments:
Anonymous:
hi
Answered by
4
class Employee
{
public static void main(String[] args)
{
float amount, discount, price;
Scanner Basic = new Scanner(System.in)
System.out.print("Enter basic salary of the employee : ");
amount = Basic.nextFloat();
System.out.println(" ");
System.out.print("Enter discount percentage : ");
discount = Basic.nextFloat();
System.out.println(" ");
price = (amount * discount)/100;
System.out.println("Total salary is", +price);
}
}
Hope this helps!
{
public static void main(String[] args)
{
float amount, discount, price;
Scanner Basic = new Scanner(System.in)
System.out.print("Enter basic salary of the employee : ");
amount = Basic.nextFloat();
System.out.println(" ");
System.out.print("Enter discount percentage : ");
discount = Basic.nextFloat();
System.out.println(" ");
price = (amount * discount)/100;
System.out.println("Total salary is", +price);
}
}
Hope this helps!
Attachments:
Similar questions