Computer Science, asked by divyanshi261, 1 year ago

write a program in Java to accept the salary of an employee and add 15% to it

Answers

Answered by Anonymous
2
I written on paper........
Attachments:

Anonymous: hi
Anonymous: tysm
siddhartharao77: r u sure it is correct?? does the following code executes???
Answered by siddhartharao77
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!
Attachments:

siddhartharao77: :-)
Similar questions