Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Ejercicios {
  3. public static void main(String args[]){
  4. Scanner in = new Scanner(System.in);
  5. System.out.println("Hey, ¿tu maldito nombre?");
  6. String nombre = in.nextLine();
  7. System.out.println("Okay " + nombre);
  8. System.out.println("¿Cual es tu edad?");
  9. int edad = in.nextInt();
  10.  
  11. if (edad < 16){
  12. System.out.println("En USA no puedes conducir pollo.");
  13. } else {
  14. System.out.println("Estas de suerte, sacate el cerné.");
  15. }
  16.  
  17. if (edad < 18){
  18. System.out.println("Tu aquí no votas niñato.");
  19. } else {
  20. System.out.println("Por aquí caballero.");
  21. }
  22.  
  23. if (edad < 25){
  24. System.out.println("¿Alquilar un coche? Fuera de mi propiedad piojoso.");
  25. } else {
  26. System.out.println("Puede alquilar el coche, ¿le lipio las botas también?");
  27. }
  28.  
  29. if (edad > 25){
  30. System.out.println("Puedes hacer lo que quieras casi.");
  31. } else {
  32. System.out.println("Aún te queda.");
  33. }
  34.  
  35. }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement