ofekkfir

exercise 7

Oct 24th, 2017
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. import java.util.*;
  2. public class targil7
  3. {  
  4.     static Scanner reader = new Scanner (System.in);
  5.  
  6.     /**
  7.      * @param args
  8.      */
  9.     public static void main(String[] args)
  10.     {
  11.         int days;
  12.         int Salary = 10000;
  13.         System.out.println ("enter number of days");
  14.         days = reader.nextInt();
  15.         if (days  == 0)
  16.         {
  17.             System.out.println ("Your salary is " + Salary*1.10 );
  18.         }
  19.         if (days == 1)
  20.         {
  21.             System.out.println ("Your salary is " + Salary*1.05 );
  22.            
  23.         }
  24.         if (days == 2)
  25.         {
  26.             System.out.println ("Your salary is " + Salary*1.03 );
  27.         }
  28.         if (days >= 3)
  29.         {
  30.             System.out.println ("Your salary is " + Salary );
  31.         }
  32.         }
  33.        
  34.  
  35.     }
Add Comment
Please, Sign In to add comment