Advertisement
fellpz

Soma 2 numeros

Apr 6th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int soma (int x, int y)
  4. {
  5. return (x+y);
  6. }
  7.  
  8.  
  9. int main ()
  10. {
  11. int num1, num2;
  12. printf ("Escreva dois numeros:\n");
  13. scanf("\n%d", &num1);
  14. printf ("+\n");
  15. scanf("\n%d", &num2);  
  16. return (soma(num1, num2));
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement