Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Expanding Numbers
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
masterofcode




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
masterofcode




PostPosted: 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...
Nathan4102




PostPosted: 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
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: