Code Wars II
Danger Level: Blue Cruiser
Point Value: 6
Because the U.S. has imposed export restrictions on encryption software, some smaller nations have no choice but to use simplistic encoding for secret government communications. Write a decoder for reverse coded messages.
The input file PROB09.IN will contain a series of words, and occasionally the key word REVERSI. Example:
Store the words in order as they appear in the input file and write them to the screen. Each time the word REVERSI appears, reverse the order of the words, then add new words to the end of the new list. Here's the result from the above input file:
the quick brown fox jumped over the