daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Sep 19th, 2018 65 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #include<iostream>
  2. using namespace std;
  3. int x, y;
  4. int *coderoare;
  5.  
  6.  
  7. int read_data()
  8. {
  9.     cout << "x = "; cin >> x;
  10.     cout << "y = "; cin >> y;
  11. }
  12.  
  13.  
  14. int checkerr(int a, int b)
  15. {
  16.     if((a > INT_MAX) && (b > INT_MAX))
  17.     {
  18.         *coderoare = 1;
  19.     }
  20. }
  21.  
  22. int adunare(int a, int b)
  23. {
  24. int *p1;
  25. int *p2;
  26.   p1 = &a;
  27.   p2 = &b;
  28.   cout << x << " + " << y << " = " << *p1 + *p2 << " err = " << coderoare;
  29. }
  30.  
  31.  
  32.  
  33. int main()
  34. {
  35. read_data();
  36. checkerr(x,y);
  37. adunare(x,y);
  38. }
  39. //cadou18
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top