Ok, my Perl teacher assigned this as the first homework assigment. Which I've been programming for a while, and only took me about 45 min to figure out. But I thought it was hard for the rest of the class who had never programmed before. So I thought I'd post it as a challenge to see how well you guys do.
[Edit] Some people weren't clear on the original instructions. So let me be more specific.
[Edit] You must stick by Perl rules also, so using data types to truncate decimal values and sych are not allowed. Perl variables change type depending on what you put in them so what is normall an Int variable can easily become a Float. Therefor, use Floats for any variables you use that hold numbers. ( This makes Kentaree's answer invalid )
Problem:
Make a program using DBP or any language of your choice that lets you input a 5 digit number, then it prints each individual digit. You may ONLY use basic math operations (+ - * / Mod ). Variables of course may be used, and the Print command to print results to screen, and Input to grab the number, and Suspend For Key to stop the program so the results are viewable. No arrays, string operations, no If-Then statements, no Loops allowed, no bitshifting either.
If you do try, please post the approximate time it took you to solve this.