Advertisement
Dprogrammed1

C++ ques 11

Mar 5th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <iostream>
  2.     using namespace std;
  3.     void square (int *x)
  4.     {
  5.     *x = (*x + 1) * (*x);
  6.     }
  7.     int main ( )
  8.     {
  9.     int num = 10;
  10.         square(&num);
  11.     cout << num;
  12.     return 0;
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement