Input Validation for 5-digit PIN number read from integer

The problem states that i need to accept any pin number between "00000" and "99999". I need to read the PIN the user enters as an integer. The problem is that if the PIN is read as an integer, the PIN "01111" will be "1111" which is invalid and the pin "00001" would be read as "1" which is also invalid. How would I go about fixing this problem for PIN numbers that start with a "0"? Again I cannot read the PIN as a char array or string.
You could make 00000, .00000 and 99999 , .99999.

Take the number into input and multiply it with base ten to -5th power.

input of 1111 becomes .01111

1 becomes .00001
Last edited on
Thank you so much, greatly appreciate your help
Topic archived. No new replies allowed.