#include<iostream> #include<sstream> #include<algorithm> #include<cstdio> #include<cmath> #define db(a) cout << #a << " = " << a << endl; using namespace std; int main(){ string cadena; stringstream ss; bool first; while(getline(cin, cadena)){ ss.clear(); first = true; ss << cadena; while(ss >> cadena){ reverse(cadena.begin(), cadena.end()); if(first) { cout << cadena; first = false; } else cout << " "<< cadena; } cout << endl; } return 0; }
No hay comentarios:
Publicar un comentario