Advertisement
triclops200

corrections

Nov 10th, 2011
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <cstring>
  4. using namespace std;
  5.  
  6. string s (string test)
  7. {
  8.     int a=strlen(test.c_str());
  9.     string reversedstring = "";
  10.     while (a != 0)
  11.     {
  12.         reversedstring += test[a];
  13.         a--;
  14.     }
  15.     return reversedstring;
  16. }
  17.  
  18.  
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement