Sunteți pe pagina 1din 1

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package pkg02;

import java.util.*;

import java.lang.*;

import java.io.*;

/**

*Hecho por Aguirre

* @author SENCICO

*/

public class Main {

/**

* @param args the command line arguments

*/

public static void main(String[] args) {

Scanner reader = new Scanner (System.in);

double n1,edad;

System.out.println("Dime tu edad");

n1 = reader.nextInt();

edad = n1;

System.out.println("Tiene: "+edad);

if (edad<18) System.out.print("Eres menor de edad "+edad);

else System.out.println("Eres mayor de edad "+edad);

S-ar putea să vă placă și