Advertisement
Guest User

Untitled

a guest
Nov 13th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.41 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class cocacola{
  3. public static void main(String args[]){
  4. Scanner in = new Scanner(System.in);
  5. String nombre = "";
  6. int sector = 0;
  7. int tiempo = 0;
  8. int dias = 0;
  9.  
  10. System.out.println("Cual es su nombre?");
  11. nombre = in.nextLine();
  12.  
  13. System.out.println("Numero de Sector:");
  14. sector = in.nextInt();
  15.  
  16. System.out.println("Antiguedad");
  17. tiempo = in.nextInt();
  18.  
  19.  
  20. if ( sector == 1 ){
  21. if ( tiempo <= 1 ){
  22. System.out.println("sus vacaciones son de 6 dias señor " + nombre );
  23. } else { if ( tiempo > 1 && tiempo <= 6)
  24. System.out.println("sus vacaciones son de 14 dias señor " + nombre );
  25. else { if ( tiempo >= 7 )
  26. System.out.println("sus vacaciones son de 20 dias señor " + nombre );
  27. }
  28. }
  29. }
  30. if ( sector == 2 ) {
  31.  
  32. if ( tiempo <= 1 ){
  33. System.out.println("sus vacaciones son de 7 dias señor " + nombre );
  34. } else { if ( tiempo > 1 && tiempo <= 6)
  35. System.out.println("sus vacaciones son de 15 dias señor " + nombre );
  36. else { if ( tiempo >= 7 )
  37. System.out.println("sus vacaciones son de 22 dias señor " + nombre );
  38. }
  39. }
  40. }
  41. if ( sector == 3 ) {
  42.  
  43. if ( tiempo <= 1 ){
  44. System.out.println("sus vacaciones son de 10 dias señor " + nombre );
  45. } else { if ( tiempo > 1 && tiempo <= 6)
  46. System.out.println("sus vacaciones son de 20 dias señor " + nombre );
  47. else { if ( tiempo >= 7 )
  48. System.out.println("sus vacaciones son de 30 dias señor " + nombre );
  49. }
  50. }
  51. }
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement