Advertisement
keviinrm7

VOID

Jun 7th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. public static void main(String[] args) {
  2. saludo ("Chumy");
  3. despedida();
  4. int resultado= f(4);
  5. System.out.println(resultado);
  6. int resultado2=cuadrado(4);
  7. System.out.println(resultado2);
  8.  
  9. }
  10. public static void saludo( String nom)
  11. {
  12. System.out.println("Buenos dias "+nom);
  13. }
  14. static void despedida()
  15. {
  16. System.out.println("Nos vemos....");
  17. }
  18.  
  19. static int f(int x)
  20. {
  21. int proceso= x+1;
  22. return (proceso);
  23. }
  24.  
  25.  
  26.  
  27. static int cuadrado(int numero)
  28. {
  29. return numero*numero;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement