Create a program that will accept the salary of an employee and bonus to it in java

 Create a program that will accept the salary of an employee and bonus to it in java

import java.util.Scanner;
public class AddIncrement
{
   public static void main(String args[]){
    double salary , bonus , new_salary;
    Scanner input = new Scanner(System.in);
    System.out.println("Enter the salary");
    salary = input.nextDouble();
    System.out.println("Enter Bonus % of the salary");
    bonus = input.nextDouble();
    new_salary=salary+(salary*bonus/100);
    System.out.println("The new salary is "+new_salary);
    } 
}

Enter the salary 100 Enter Bonus % of the salary 15 The new salary is 115.0

Comments

Popular posts from this blog

Make a GST Calculator using HTML and JavaScript

How to make simple bill maker by using python tkinter

Write a program to find the sum of 1/2+4/3+5/6+8/7+9/10 using loop in java