Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- switch(num) {
- case 1: // -------------------- Ejercicio 1: ----------------------------
- System.out.print("Presiona Enter para saludar :)");
- teclado.nextLine();
- saludo1(); // llamar al metodo
- break;
- case 2: // -------------------- Ejercicio 2: ----------------------------
- System.out.print("Dame un numero: "); // pedir el numero
- int numb = teclado.nextInt();
- cuadrado2(numb); // llamar al metodo
- break;
- case 3: // -------------------- Ejercicio 3: ----------------------------
- System.out.print("Dame el primer numero: "); // pedir los numeros
- int num01 = teclado.nextInt();
- System.out.print("Dame el segundo numero: ");
- int num02 = teclado.nextInt();
- System.out.println("La media es: "+media3(num01,num02)); // llamar a la funcion
- break;
- case 4: // -------------------- Ejercicio 4: ----------------------------
- System.out.print("Dame un nombre: "); // pedir los datos
- String nom_4 = teclado.nextLine();
- System.out.print("Dame un apellido: ");
- String ape_4 = teclado.nextLine();
- System.out.print("Dame un lugar: ");
- String lug_4 = teclado.nextLine();
Add Comment
Please, Sign In to add comment