Advertisement
pauloludewig

declarando funcao

May 2nd, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. void funcao(int carta, int *soma)
  5. {
  6. *soma = *soma + carta;
  7. }
  8.  
  9. int main(void)
  10. {
  11. int carta=5, soma=0;
  12. funcao(carta, &soma);
  13. printf("%d\n", soma);
  14. system("PAUSE");
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement