fourgas4:
While I'm using single digits, the code works flawlessly. When I try to use two digits, it only takes one for each value.
There are two ways to do numeric input.
The simple way is to accept each digit individually and total them as you go. That is, reset the number to zero and start accepting digits. Each time you get a digit, multiply the total by 10 and add the next digit. This works ok for positive integers.
The other way is to read the digits into a char[] buffer. When there are no more digits (eg, the user has hit enter or tab), parse the number using atoi or atof.