#include <algorithm> #include <iostream> using namespace std; int main() { string str; getline(cin, str); reverse(str.begin(),str.end()); int start = 0; for(int i = 0; i <= str.length(); i++){ if(str[i] ==' ' || i == str.length()){ reverse(str....