If I enter this input (number): 52483

(let's call the input 'num')

how can I modulo to get the '5'?

I know to get the 3, I only need to do num % 10, but how do I modulo to get the '5'?

also, I need something that will work if the number is longer or shorter than this input (For example if num were '2342' or longer '1290381' how would I modulo to get the number all the way at the left?)

Thanks.