View Code of Problem 114

#include<iostream>
#include<sstream>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
    string str,s;

    getline(cin,str);
    istringstream stream(str);
    while(stream>>s){
        reverse(s.begin(),s.end());
        cout<<s<<" ";
    }
    return 0;
}

Double click to view unformatted code.


Back to problem 114