Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Ejercicios {
- public static void main(String args[]){
- Scanner in = new Scanner(System.in);
- System.out.println("Hey, ¿tu maldito nombre?");
- String nombre = in.nextLine();
- System.out.println("Okay " + nombre);
- System.out.println("¿Cual es tu edad?");
- int edad = in.nextInt();
- if (edad < 16){
- System.out.println("En USA no puedes conducir pollo.");
- } else {
- System.out.println("Estas de suerte, sacate el cerné.");
- }
- if (edad < 18){
- System.out.println("Tu aquí no votas niñato.");
- } else {
- System.out.println("Por aquí caballero.");
- }
- if (edad < 25){
- System.out.println("¿Alquilar un coche? Fuera de mi propiedad piojoso.");
- } else {
- System.out.println("Puede alquilar el coche, ¿le lipio las botas también?");
- }
- if (edad > 25){
- System.out.println("Puedes hacer lo que quieras casi.");
- } else {
- System.out.println("Aún te queda.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement