Read about the how to pass parameters to a function, like pass the value, pass the address (by pointer). Here you need use the second one.

Qt Code:
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3.  
  4. void LimitesLee(int * linf, int * lsup)
  5. {
  6. printf("Introduzca limite inferior y superior.\n");
  7. scanf("%d",linf);
  8. scanf("%d",lsup);
  9. }
  10.  
  11. void LimitesImprime(int linf, int lsup)
  12. {
  13. printf("Limites: [%d, %d]",linf,lsup);
  14. }
  15.  
  16. int main()
  17. {
  18. int linf = 0;
  19. int lsup = 0;
  20.  
  21. LimitesLee(&linf,&lsup);
  22. LimitesImprime(linf,lsup);
  23.  
  24. system("pause");
  25. return 0;
  26. }
To copy to clipboard, switch view to plain text mode