Advertisement
Guest User

prueba1

a guest
Dec 13th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Modularizacion {
  4.  
  5. public static void cal(String[] args) {
  6.  
  7. Scanner sc = new Scanner(System.in);
  8. float a = 0,b = 0;
  9.  
  10. Modularizacion.mod1(args);
  11. System.out.println("El resultado es: " + (a+b));
  12.  
  13. public static void mod1(String[] args) {
  14.  
  15. float a,b;
  16. Scanner sc = new Scanner(System.in);
  17.  
  18. System.out.println("Introduzca el 1er numero:");
  19. a = sc.nextFloat();
  20. System.out.println("Introduzca el 2ΒΊ numero:");
  21. b = sc.nextFloat();
  22. }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement