Author: Anonymous Language: cpp
Description: No description Timestamp: 2007-10-17 12:50:48 -0400
View raw paste Reply
  1. #include <iostream>
  2. #include <string.h>
  3. using namespace std;
  4.  
  5. int main() {
  6.         string line;
  7.         string reviseline;
  8.         getline(cin,line);
  9.         line+=" ";
  10.         while (line.find(" ") != -1)
  11.         {
  12.                 reviseline=line.substr(0,(line.find(" "))+1)+reviseline;
  13.                 line.erase(0,(line.find(" "))+1);
  14.         }
  15.                 cout << reviseline;
  16.         return(0);
  17. }
View raw paste Reply