You should have your code the other way - scan an integer, print a character.