Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Eytan {
- static Scanner in = new Scanner(System.in);
- public static void main(String[] args) {
- final double EMP_FACTOR = 0.3;
- int e1,e2,e3,e4, man, costumer, salary, high1=0, high2=0, high3=0, empCnt=0;
- double bonus;
- System.out.println("Please enter salary");
- salary = in.nextInt();
- if (salary<1000)
- System.out.println("error in input");
- System.out.println("Please enter manager grade: ");
- man = in.nextInt();
- if(man<0 || man>100)
- System.out.println("error in input");
- System.out.println("please enter 4 team members grade");
- e1 = in.nextInt();
- if(e1<0 || e1>100)
- System.out.println("error in input");
- e2 = in.nextInt();
- if(e2<0 || e2>100)
- System.out.println("error in input");
- e3 = in.nextInt();
- if(e3<0 || e3>100){
- System.out.println("error in input");
- exit();
- }
- e4 = in.nextInt();
- if(e4<0 || e4>100)
- System.out.println("error in input");
- System.out.println("Please enter customer grade: ");
- costumer= in.nextInt();
- if(costumer<0 || costumer>100)
- System.out.println("error in input");
- if(e1 != 0) {
- high1 = e1;
- empCnt++;
- }
- if(e2 != 0) {
- high2 = e2;
- empCnt++;
- }
- if(e3 != 0) {
- high3 = e3;
- empCnt++;
- }
- if (e1<e2&&e1<e3&&e1<e4)
- high1 = e4;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement