This file contains hidden or 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
public class Codigo5 { | |
Scanner s = new Scanner(); | |
System.out.print("Introduzca un número: '); | |
String ni = s.nextLine(); | |
int c = ni; | |
int afo = 0; | |
int noAfo = 0; | |
This file contains hidden or 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
public class codigo6 { | |
int[] n = int[20]; | |
for (int i = 0; i < 20; i+) { | |
n[i] = (int)(Math.random() * 381) + 20; | |
System.print(n[i] + " "); | |
} | |
System.out.printl("\n¿Qué números quiere resaltar? "); |
This file contains hidden or 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
package ejerciciosFer4; | |
import java.util.Scanner; //importo scanner | |
public class Ejercicio4 { | |
@SuppressWarnings("resource") // agrego esto desde return | |
public static void main(String[] args) { | |
Scanner s = new Scanner(System.in); | |
System.out.print("Turno del jugador 1 (introduzca piedra, papel o tijeras): "); |