UNA HERMOSA MOTO

UNA HERMOSA MOTO

miércoles, 22 de abril de 2015

Problema Resuelto 11


11.- EL NÚMERO MAYOR

Resultado de imagen para NUMERO MAYOR




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

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException  {
     int n1, n2, m = 0;
 BufferedReader in=new BufferedReader(new  InputStreamReader(System.in));
 System.out.println("Número 1: ");
 n1=(int) Integer.parseInt(in.readLine());
 System.out.println("Número 2: ");
  n2=(int) Integer.parseInt(in.readLine());
    if(n1>n2)
    m= n1;
    if(n2>n1)
    m= n2; 
 System.out.println("");
 System.out.println("Mayor:"+m);

       
    }
}
   

No hay comentarios:

Publicar un comentario