UNA HERMOSA MOTO

UNA HERMOSA MOTO

miércoles, 22 de abril de 2015

Problema Propuesto 11


11.- MAYOR O MENOR DE EDAD

Resultado de imagen para MAYOR DE EDAD

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package propuesto011;
import java.io.*;
/**
 *
 * @author abel montalvan
 */
public class Propuesto011 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        int edad;
        BufferedReader in =new BufferedReader(new  InputStreamReader(System.in));
      System.out.println("ingresa la edad de cualquier persona");
      edad  = Integer.parseInt(in.readLine());
      
           
       if(edad>=18)
     System.out.println("la persona es mayor de edad");    

       else

           System.out.println("la persona es menor de edad");
       
   
    }
}

No hay comentarios:

Publicar un comentario