I guess to start i will post what my teacher is wanting me to program...

Note that leading zeros are NOT printed. For example, the number 02244 is NOT printed as zero two two four four. The correct output is two two four four. However, the value for the number 0 is printed as a single zero. The words printed out are separated by single space. Here is the algorithm in pseudo-code (variables in italics):

Your program MUST:Code:main() print instructions to the user get number to print and store as inputNumber if inputNumber is zero then print the word "zero" otherwise { if inputNumber is less than zero then print the word "minus" make the number positive set remainder to inputNumber set divisor to 10,000 loop until divisor is zero { if inputNumber is greater than or equal to divisor then set digit to remainder divided by divisor set remainder to remainder MOD divisor pass digit to function PrintDigit() set divisor to divisor divided by 10 } } PrintDigit() switch on digit { case 0: print "zero" case 1: print "one" . . . case 9: print "nine" default: print " unknown digit detected " }

---Use the given pseudo-code algorithm DO NOT invent your own algorithm. No marks will be given if you diverge from the given algorithm.

---use "scanf() to read in the numbers from the user.

---------------------

So basically I have to turn that all into code, but im kinda stuck and cant figure it out. Ive got it all done up until it asks me to pass digit to function printdigit. After that point im kinda messed up, im not sure how to do that and set up the switch.

Any help to point me in the right direction would be much appreciated.