Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1.  
  2. import java.util.Scanner;
  3.  
  4. public class Eytan {
  5.  
  6. static Scanner in = new Scanner(System.in);
  7. public static void main(String[] args) {
  8.  
  9. final double EMP_FACTOR = 0.3;
  10.  
  11. int e1,e2,e3,e4, man, costumer, salary, high1=0, high2=0, high3=0, empCnt=0;
  12. double bonus;
  13.  
  14. System.out.println("Please enter salary");
  15. salary = in.nextInt();
  16. if (salary<1000)
  17. System.out.println("error in input");
  18.  
  19.  
  20. System.out.println("Please enter manager grade: ");
  21. man = in.nextInt();
  22. if(man<0 || man>100)
  23. System.out.println("error in input");
  24.  
  25. System.out.println("please enter 4 team members grade");
  26. e1 = in.nextInt();
  27. if(e1<0 || e1>100)
  28. System.out.println("error in input");
  29. e2 = in.nextInt();
  30. if(e2<0 || e2>100)
  31. System.out.println("error in input");
  32. e3 = in.nextInt();
  33. if(e3<0 || e3>100){
  34. System.out.println("error in input");
  35. exit();
  36. }
  37. e4 = in.nextInt();
  38. if(e4<0 || e4>100)
  39. System.out.println("error in input");
  40.  
  41. System.out.println("Please enter customer grade: ");
  42. costumer= in.nextInt();
  43. if(costumer<0 || costumer>100)
  44. System.out.println("error in input");
  45.  
  46.  
  47. if(e1 != 0) {
  48. high1 = e1;
  49. empCnt++;
  50. }
  51.  
  52. if(e2 != 0) {
  53. high2 = e2;
  54. empCnt++;
  55. }
  56.  
  57. if(e3 != 0) {
  58. high3 = e3;
  59. empCnt++;
  60. }
  61.  
  62. if (e1<e2&&e1<e3&&e1<e4)
  63. high1 = e4;
  64.  
  65.  
  66.  
  67.  
  68. }
  69.  
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement