What's wrong with reading it as char's. Just subtract the ascii value for '0' from the char that was read.

eg. if you read '9', then '9' - '0' will give you the integer value 9.