Maybe the inkey statement will be useful for you.
inkey()

Anyway, this is more complicated way to read numbers. You will realise...