6) Que lea dos números y los imprima en forma ascendente.
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package EJERCICIO1;
/*** @autora estefanya*/
public class ejercicio6ascendente {
/** @param args the command line arguments*/
public static void main(String[] args) {
int numero1, numero2;
System.out.print("Ingresa Numero 1:");
numero1 = entrada.entero();
System.out.print("Ingresa Numero 2:");
numero2 = entrada.entero();
if (numero1 < numero2)
System.out.print(numero1+numero2);
else
System.out.println( numero2+" y "+ numero1);
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package EJERCICIO1;
/*** @autora estefanya*/
public class ejercicio6ascendente {
/** @param args the command line arguments*/
public static void main(String[] args) {
int numero1, numero2;
System.out.print("Ingresa Numero 1:");
numero1 = entrada.entero();
System.out.print("Ingresa Numero 2:");
numero2 = entrada.entero();
if (numero1 < numero2)
System.out.print(numero1+numero2);
else
System.out.println( numero2+" y "+ numero1);
}
}
No hay comentarios:
Publicar un comentario