Code looks fine to me you should use spaces though (example cin >> a;).
What are you typing in the command prompt? Are you entering a number? Character?
I have a feeling you are trying to type a character in there. int can only hold whole numbers. If you want to hold a character (example 'a') use char a;. Or if you want to hold a word use string a;.
Note: When you use string you must include the proper header files #include <string> and using declarations using std::string; (You don't need this because you have usingnamespace std;
First, it would be a good habit to use the code tags to post code here!
Second, your code is correct and even compiles for me in Code::Blocks, my guess is that your online IDE just doesn't provide an input for your program. Use Code::Blocks (or any other offline IDE) instead.
On the page you linked on ideone.com, under your source code there is a link labeled 'upload with new input' click it and add your input into the text field.