Usar Integer.MIN_VALUE como valor mínimo

This commit is contained in:
PC de clase committed 2026-09-25 10:35:26 +02:00
1 parent c4e0d4f215
commit 12e68911b2
1 file changed
+1 -1
+1 -1
View File
@@ -4,7 +4,7 @@ import java.util.Scanner;
void main() { void main() {
Scanner sc = new Scanner(System.in); Scanner sc = new Scanner(System.in);
int mayor = 0; int mayor = Integer.MIN_VALUE;
System.out.print("Escribe tres numeros: "); System.out.print("Escribe tres numeros: ");
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
int n = sc.nextInt(); int n = sc.nextInt();