title: How do I extract a single digit from a 3 digit whole number?
body: <p>This isn't a homework question, I'm just curious. If I had a program that calculated a 3 digit number, say 123, how can I get just the "1"? I'm trying to print a message at the end that says "(The first digit) tells you...and (the last two digits) tell you..." But I'm not sure HOW to save or get that single digit. Any ideas? Is the a simpler way to do this other than using an array?Thanks.</p>