WORDS IN REVERSE
Accept a paragraph of text consisting of sentences that are terminated by either “.”, “,”, “!” or a”?” followed by a space. Assume that there can be a maximum of 5 sentences in a paragraph.
Design a program to perform the following:
(a) Arrange the words of sentences in reverse order, sentence by sentence.
(b) Separate the words which ends with a vowel in a string.
Sample data 1:
INPUT : HELLO! HOW ARE YOU? WHEN ARE YOU COMING?
HOPE TO SEE YOU SOON.
OUTPUT : OLLEH! WOH ERA UOY? NEHW ERA UOY GNIMOC?
EPOH OT EES UOY NOOS..
VOWELS : HELLO, ARE, YOU, HOPE, TO, SEE