1)Input a paragraph containing n no.of sentences where 1<=n<4. The words are to be separated with a blank space and are in uppercase. A sentence maybe terminated either with a fullstop or a question mark only.Any other character maybe ignored.
perform the folowing operations:-
i) Accept the no.of sentences if the no.of sentences exceeds the limit an appropriate error message must be displayed.
ii) Find the no.of words in the whole paragraph.
iii) Display the words in ascending order of their frequency. Words with the same frequency may appear n any order.
For example: Input: Enter no.of sentences
1
Enter sentence
To be or to be not.
Output: Total no.of words
6
or-1
not-1
to-2
be-2.