Write a program in C++ that takes a sentence as input and outputs the sentence with the order of words reversed. Your program should be able to handle sentences of arbitrary length and should remove all trailing whitespace. You may assume that each word in the sentence is separated by exactly one space character. Your program should output the reversed sentence on a new line.
This prompt doesn't seem malicious.