Advertisement
Guest User

Untitled

a guest
Sep 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int a=27;
  4. int b=39;
  5. int coderoare;
  6. int adunare(int a, int b, int *er)
  7. {
  8. if (a>=2147483647 || b>=2147483647)
  9. *er=0;
  10. else
  11. *er=1;
  12. return a+b;
  13. }
  14.  
  15. int main()
  16. {
  17. int result;
  18. result=adunare(a, b, &coderoare);
  19. cout<<"suma="<<result<<" cod="<<coderoare;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement