See Appendix A, Exercise Answers for answers.
Write a program that reads a list of strings on separate lines and prints out the list in reverse order. If you're reading the list from the console, you'll probably need to delimit the end of the list by pressing CTRL-Z.
at the beginning of your program (this initializes the random number generator), and then use
where you need a random value between 0 and 1 less than the length of