backwards instructions labtask the wrote I if confusing very be would It. But you could solve the problem by writing a program that reads the words and reverses them. This can be done by reading a word of the sentence, then recursively reading and reversing the rest of the sentence, and then writing out the word. Write a program that implements this way of reversing a sentence, reading in words until one that ends in a ".".

Here what a sample run should look like (with the keyboard input shown in italics) ...

Please enter a backwards sentence: 
backwards instructions labtask the wrote I if confusing very be would It.
Forwards it is: It would be very confusing if I wrote the labtask instructions backwards.

You must ...

Answer