using namespace std;
#include <iostream>

void byvalue(int x)
{
  x=2;
  cout<< "Inside by-value procedure: " << x << endl;
}

void byref(int& x)
{
  x=2;
  cout<< "Inside by-ref   procedure: " << x << endl;
}

main()
{
  int y=1;
  cout<< "Before by-value procedure: " << y << endl;
  byvalue(y);
  cout<< "After  by-value procedure: " << y << endl;
  byref(y);
  cout<< "After  by-ref   procedure: " << y << endl;
}
