You can use Cout to output to console and Cin to get input from the console.

#include <iostream>

int main()  
{
    using namespace std;
    cout << "Enter a number: ";
    int x;
    cin >> x;
    cout << "You entered " << x << endl;
    return 0;
}