Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
819 B
0
Indexable
Never
 System.out.print("Enter level Trainee(1) Advanced(2) Expert(3): ");
      int level = in.nextInt();
      System.out.print("Enter Months: ");
      int months = in.nextInt();
      int hoursLeave = 0;
   
      switch(level){
         case 1:
            if( months < 12){
               hoursLeave = 4;
            }else if (months <24){
               hoursLeave = 6;
            }else{
               hoursLeave = 12; 
            }
            break;
         case 2:
            if(months < 24){
               hoursLeave = 8;
            }else{
               hoursLeave = 10;
            }
            break;
         case 3:
            hoursLeave = 12;
            break;
         default:
            break;
      
      }
      System.out.println("You can get "+hoursLeave + " hours leave per pay period");