Hi, everyone!

I'm just starting to learn C++. I wrote this basic program, but it's closing before I can see the output. The "cin.get()" line doesn't seem to be working. What am I doing wrong?

Thanks

Code:
#include <iostream>

using namespace std;

int main()
{
    int a;
    cout<<"Hey! What's your favourite digit?\n";
    cin>> a;
    cout<<"You entered: "<< a<<"\n";
    cin.get();
}