#include using namespace std; int squareByValue(int x); void squareByRef(int & x); void squareByPointer(int *pt); int main() { int number{3}; cout << squareByValue(number) << endl; cout << number << endl; squareByRef(number); cout << number << endl; squareByPointer(&number); cout << number << endl; } int squareByValue(int x) { return x*x; } void squareByRef(int & x) { x*=x; } void squareByPointer(int *pt) { *pt *= *pt; }