-
Notifications
You must be signed in to change notification settings - Fork 20.8k
Closed
Description
package progr;
import java.util.Scanner;
public class Arreglos {
public static void main(String[] args) {
Scanner teclado = new Scanner(System.in);
System.out.println("Introduce 5 Numeros");
int[] arreglo = new int[4];
for ( int i = 0; i < arreglo.length; i++){
arreglo[i] = teclado.nextInt();
}
int mayor = arreglo[0];
for ( int i = 0; i < arreglo.length; i++){
if (mayor < arreglo[i]){
mayor = arreglo[i];
}
}
System.out.printf("El numero mayor es: %s",mayor);
}
}
Metadata
Metadata
Assignees
Labels
No labels