Computer Science Canada

Displaying a random word from a text file and scramble?

Author:  Stizzle [ 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?

Author:  Tony [ 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.

Author:  TokenHerbz [ 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!


: