Computer Science Canada

Expanding Numbers

Author:  masterofcode [ Wed Mar 04, 2015 3:56 pm ]
Post subject:  Expanding Numbers

What is it you are trying to achieve?
The user will input a number and I have to output it in expanded form
E.g.
Input: 4756
Output: 4000 + 700 + 50 + 6


What is the problem you are having?
Not sure how to do this with IO as the inputs are from a file. I have to do it with file IO.

Please specify what version of Turing you are using
4.1.1

Author:  masterofcode [ Wed Mar 04, 2015 4:06 pm ]
Post subject:  Re: Expanding Numbers

Or else if somebody could tell me how to use locate in file IO I could do it...

Author:  Nathan4102 [ Wed Mar 04, 2015 5:11 pm ]
Post subject:  RE:Expanding Numbers

File IO isn't difficult, you just need the syntax. See if you can solve the problem with your input stored in a variable and your output sent to the screen first.

http://wiki.compsci.ca/index.php?title=Turing_File_IO


: