Write your question here.
Write a program that modifies a given sentence by the last word to the beginning of sentences.To consider that words are separated by exactly one with blank sign.A sentence in the form of string set by the user.Show modified string.
Please note that this is not a homework site. We won't do your homework for you. The purpose of homework is that you learn by doing. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.
We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again.
There are logical steps to do:
1. Read a string from input
2. Find the last space in the string
3. Construct new string from the two pieces
4. Write a string to output