Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. // Es una buena práctica definir el prototipo de las funciones aquí arriba
  4. // ojo: sólo el prototipo, no el cuerpo
  5. int incrementar(int numero);
  6.  
  7. int main(int argc, char const *argv[])
  8. {
  9. int numero = 10;
  10. printf("Antes de llamar a la funcion, numero es %d\n", numero);
  11. incrementar(numero);
  12. printf("Despues de llamar a la funcion, numero es %d", numero);
  13. }
  14.  
  15. // Ahora sí definimos la función con todo y cuerpo
  16. int incrementar(int numero){
  17. //Incrementar en 1
  18. numero = numero + 1;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement