Created
November 8, 2021 14:17
-
-
Save kurotori/68d8eab54090510abd5fc205086300ee to your computer and use it in GitHub Desktop.
Ejercicio de Código 01
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner teclado = new Scanner(System.in); | |
String[] usuarios = new String[5]; | |
int[] puntajes = new int[5]; | |
for (int posicion = 0; posicion < usuarios.length; posicion++) { | |
System.out.println("Escriba el nombre del jugador " + (posicion + 1) + ":"); | |
usuarios[posicion] = teclado.nextLine(); | |
puntajes[posicion] = 0; | |
} | |
teclado.close(); | |
for (int posicion = 0; posicion < usuarios.length; posicion++) { | |
System.out.println("Jugador:" + usuarios[posicion]); | |
System.out.println("Puntaje:" + puntajes[posicion]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment