Broken number 10?

I have literally just started learning C++. Going through and doing semi guided lessons from a book. I ran into an issue within 10mins that I have absolutely no idea how it could be a problem. The console does not like the number 10, not as an integer anyways, here is the code:

I'm using Code::Blocks and the compiler that it came bundled with when I downloaded it from Code::Blocks site. Am I doing something wrong? Any variation on getting the number 10 comes up blank. Any and all insight on the problem is greatly appreciated.

Edit: The console would just display it for less than a second. The other stuff is C::B related. I had always used cin.get(); before return 0;, which waits for the 'Enter' to be pressed, back when I used the console. There are many ways of fixing it. I think this way is not liked by others, but I am not sure.

I did, and gave it a basic name so I knew where to find it. The first project I did had the same issue, thought it might have been something I had done in that particular project. How do I check/change my compiler settings?