Computer Science, asked by sunithavk1999, 18 days ago

W rite a Java program for A company decided to give bonus of 10% to employee if his/her year of service is more than 6 years.
Ask user for their salary and year of service and print the net bonus amount.

Answers

Answered by adarshtsg5
0

Answer: This program is of different similar question

import java.util.Scanner;

public class bonus

{

public static void main(String args[])

{

double c;

Scanner in = new Scanner(System.in);

double a; double b;

System.out.println("Input the monthly salary");

a=in.nextInt();

System.out.println("Give your serving years");

b=in.nextInt();

c=(5/100)*a;

if (b>5||b==5)

{

System.out.println("Here's your bonus:]" +c);

}

else

{

System.out.println("Your bonus access is denied");

}

}

}

Similar questions