Works fine for me, your console is closing before you see anything, have a read of the console closing down topic which stickied to the beginners forum .
:+)
Edit:
Try running it with the gear icon top right of your code.
The console showing nothing could be as @kemort said, leftover trash from a previous project. What compiler are you running? If you went with VS2010, just restart it or copy your code into a completely new project and compile.
If the issue is with the console closing down too fast and you not seeing the results properly, add this bit of code right before the closing bracket in main: cin.ignore(999,'\n');