Advertisement
Imran2544

World Scramble

Nov 11th, 2018
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     string s;
  7.     while (getline(cin, s)) {
  8.         string w;
  9.         stringstream ss(s);
  10.         while (ss>>w) {
  11.             reverse(w.begin(), w.end());
  12.             cout<<w<<" ";
  13.         }
  14.         cout<<endl;
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement