Ejercicios Capitulo 5 bloque1
This commit is contained in:
@@ -13,9 +13,22 @@ public class Utils {
|
||||
Scanner sc = new Scanner(System.in);
|
||||
return sc.nextLine();
|
||||
}
|
||||
|
||||
public static int solicitarIntScannerInline(String pregunta) {
|
||||
System.out.print(pregunta);
|
||||
Scanner sc = new Scanner(System.in);
|
||||
return sc.nextInt();
|
||||
}
|
||||
public static String solicitarStringScannerInline(String pregunta) {
|
||||
System.out.print(pregunta);
|
||||
Scanner sc = new Scanner(System.in);
|
||||
return sc.nextLine();
|
||||
}
|
||||
|
||||
public static double generarNumAleatorio(int multiplicador) {
|
||||
return Math.random() * multiplicador;
|
||||
}
|
||||
|
||||
public static void mostrarArrayNums(int array[]) {
|
||||
for (int num : array) {
|
||||
System.out.print(num + " ");
|
||||
|
||||
Reference in New Issue
Block a user