Not sure why you are using cin.get() as this is used to only get one character and treat it as a char, not int (see here: http://www.cplusplus.com/forum/general/465/) That being said, the easiest way to get the correct output would be
You may want to use your favourite search engine and search for "ASCII Table", then click on one of the first several links. Then look up the decimal equivalent for the character '1' .