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

Username:   Password: 
 RegisterRegister   
 So, I've got this problem...
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
juniorspank




PostPosted: Wed Dec 17, 2003 5:22 pm   Post subject: So, I've got this problem...

I bet my friend $10 that I could do a lot in turing. He said, you're on if you can do this: make something that will read from a file and put every odd word on the screen and every even word in another file... I can't figure it out, could you help me make $10? Or just give me hints and tips?
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Wed Dec 17, 2003 6:15 pm   Post subject: (No subject)

well i think it whould be more likly that your compsci teacher asked you to do this as an asigment.

but will will give you some tips anyway:

1st you will need to know how the turing file I/O works, you can find inforamtion about this on this site and in the truing documation.

next you will need to set up 2 file streams, one in one out. you will have to open a conection to the file the text is in and one to where you whont to put 1/2 of it.

then you will have to be loading each worad in the file one at a time using a loop in to a temp varible. in this loop you will need to have a counter, if this value is even put the temp value to the screen if it is odd put it in the file. to tell if a varible is odd or even you can uses the mod opreator.


now if you whont me to do your homewrok for you send me the 10 bucks and then we can talk Twisted Evil
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
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  [ 2 Posts ]
Jump to:   


Style:  
Search: