Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Salary{
- public static void main(String args[]){
- int workhour,salary;
- Scanner input= new Scanner (System.in);
- System.out.println("please Enter work hour of employee");
- workhour=input.nextInt();
- if(workhour<=40)
- {
- salary=450*workhour;
- System.out.println("salary is "+salary);
- }
- else if(40<=workhour && 60>workhour)
- {
- salary=(40*450)+((workhour-40)*650);
- System.out.println("salary is "+salary);
- }
- else
- {
- salary=650*workhour;
- System.out.println("salary is "+salary);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement