Guest User

Untitled

a guest
Jan 20th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. switch(num) {
  4. case 1: // -------------------- Ejercicio 1: ----------------------------
  5. System.out.print("Presiona Enter para saludar :)");
  6. teclado.nextLine();
  7. saludo1(); // llamar al metodo
  8.  
  9. break;
  10.  
  11.  
  12. case 2: // -------------------- Ejercicio 2: ----------------------------
  13. System.out.print("Dame un numero: "); // pedir el numero
  14. int numb = teclado.nextInt();
  15. cuadrado2(numb); // llamar al metodo
  16. break;
  17.  
  18. case 3: // -------------------- Ejercicio 3: ----------------------------
  19. System.out.print("Dame el primer numero: "); // pedir los numeros
  20. int num01 = teclado.nextInt();
  21. System.out.print("Dame el segundo numero: ");
  22. int num02 = teclado.nextInt();
  23.  
  24. System.out.println("La media es: "+media3(num01,num02)); // llamar a la funcion
  25.  
  26. break;
  27.  
  28. case 4: // -------------------- Ejercicio 4: ----------------------------
  29. System.out.print("Dame un nombre: "); // pedir los datos
  30. String nom_4 = teclado.nextLine();
  31. System.out.print("Dame un apellido: ");
  32. String ape_4 = teclado.nextLine();
  33. System.out.print("Dame un lugar: ");
  34. String lug_4 = teclado.nextLine();
Add Comment
Please, Sign In to add comment