Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class targil9
- {
- static Scanner reader = new Scanner (System.in);
- /**
- * @param args
- */
- public static void main(String[] args)
- {
- int salary_manager = 15000;
- int salary_employee = 10000;
- int mang_emp , days;
- System.out.println("Enter 1 if your a manager or 2 if your a employee");
- mang_emp = reader.nextInt();
- System.out.println("Enter days you have been missing");
- days= reader.nextInt();
- if (mang_emp == 1 )
- {
- if (days == 0 )
- {
- System.out.println ("Your salary is " + salary_manager*1.15 );
- }
- if (days == 1 )
- {
- System.out.println ("Your salary is " + salary_manager*1.07 );
- }
- if (days == 2 )
- {
- System.out.println ("Your salary is " + salary_manager*1.05 );
- }
- if (days >=3 )
- {
- System.out.println ("Your salary is " + salary_manager);
- }
- }
- if (mang_emp == 2)
- {
- if (days == 0)
- {
- System.out.println ("Your salary is " + salary_employee*1.10 );
- }
- if (days == 1)
- {
- System.out.println ("Your salary is " + salary_employee*1.05 );
- }
- if (days == 2)
- {
- System.out.println ("Your salary is " + salary_employee*1.03 );
- }
- if (days >= 3)
- {
- System.out.println ("Your salary is " + salary_employee );
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment