AlbertMourato

Untitled

Nov 24th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4.     string entrada;
  5.     int k;
  6.     bool go = true;
  7.     cin>>entrada;
  8.     while(go){
  9.         k = entrada.size()-1;
  10.         while(k>-1){
  11.             cout<<entrada[k];
  12.             k--;
  13.         }
  14.         if(entrada[entrada.size()-1]=='.'){
  15.             cout<<"\n";
  16.         }
  17.         if(cin>>entrada){
  18.             go = true;
  19.             cout<<" ";
  20.         }else{
  21.             go = false;
  22.         }
  23.  
  24.     }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment