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

How to make simple bill maker by using python tkinter

Calculate Compound Interest in JavaScript

Make a GST Calculator using HTML and JavaScript