Advertisement
SergeyPGUTI

7.1.2

Nov 26th, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6.  void correct(int **p)
  7. {
  8.     if (**p<0) (*p)=NULL;
  9. }
  10.  
  11. int main()
  12. {
  13.     int x;
  14.     cin>>x;
  15.     int * p=&x;
  16.     correct(&p);
  17.     cout<<p;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement