Input in variable but display by pointer

Description:

Take input in variable and display same value by pointer Test Case 1 Input (stdin) 5 Expected Output 5 Test Case 2 Input (stdin) 65 Expected Output 65

Program :

#include <iostream>

using namespace std;

int main()

{

int *a,b;

  cin>>b;

  a=&b;

  cout<<*a;

return 0;

}