SHARE
TWEET

Untitled

a guest Feb 21st, 2020 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. class Boss {
  3. static void Main() {
  4. Console.WriteLine("Enter your employee ID : ");
  5. int id = Convert.ToInt32(Console.ReadLine());
  6.  
  7. switch(id)
  8. {
  9. case 1001:
  10. Console.WriteLine("Employee name : Jose Rizal");
  11. Console.WriteLine("Employee Position : Manager");
  12. Console.WriteLine("Employee Rate : 750 /hr");
  13. Console.WriteLine("Late : ");
  14. int late = Convert.ToInt32(Console.ReadLine());
  15. Console.WriteLine("Absencess : ");
  16. int absent = Convert.ToInt32(Console.ReadLine());
  17. Console.WriteLine("Overtime : ");
  18. int overtime = Convert.ToInt32(Console.ReadLine());
  19. Console.WriteLine("Undertime : ");
  20. int undertime = Convert.ToInt32(Console.ReadLine());
  21.  
  22. int hours = 248;
  23. double late1 = late * 1/60;
  24. int total1 = absent*8;
  25. double undertime1 = undertime * 1/60;
  26. double final_total = hours - (total1 + overtime + late1 + undertime1);
  27. Console.WriteLine("No. of hours Reduced : " + final_total);
  28. int Rate = 750;
  29. double salary = final_total * Rate;
  30. Console.WriteLine("Total Salary : " + salary);
  31. break;
  32.  
  33. case 1002:
  34. Console.WriteLine("Employee name : Andress Bonifacio");
  35. Console.WriteLine("Employee Position : Supervisor");
  36. Console.WriteLine("Employee Rate : 650 /hr");
  37. break;
  38.  
  39. case 1003:
  40. Console.WriteLine("Employee name : Gabriela Silang");
  41. Console.WriteLine("Employee Position : Clerk");
  42. Console.WriteLine("Employee Rate : 350 /hr");
  43. break;
  44. }
  45. }
  46. }
  47. Previous
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top