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

Username:   Password: 
 RegisterRegister   
 Displaying a random word from a text file and scramble?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Stizzle




PostPosted: Wed Jan 09, 2008 9:53 pm   Post subject: Displaying a random word from a text file and scramble?

Currently I'm doing an ISU for computer science. I just began comp sci this year so my knowledge on turing is limited.
I'm stuck on trying to read a text file and selecting a random word from that text file displaying it scrambled.

Eg. Computer is in the text file
I want to display the word computer scrambled randomly every time the program runs

Any hints on what to do?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Jan 09, 2008 11:14 pm   Post subject: RE:Displaying a random word from a text file and scramble?

The same thing has been recently asked.

Your hint is that a word is a collection of characters. You can access substrings one letter at a time, or in blocks. word(2..3) I think.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
TokenHerbz




PostPosted: Thu Jan 10, 2008 12:00 am   Post subject: RE:Displaying a random word from a text file and scramble?

hints:
1) array (id used it because there fun to use) but im sure you can make it without an array.
2) string minipulation (if i could spell)
try searching up index and length to start, this program should be a ton of fun to play around with!
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: