123456789101112
#include <iostream> #include <string> using namespace std; int main() { string s; cout << "Enter string: "; cin >> s; s = s.substr(1).append(s.substr(0,1)); cout << s << endl; return 0; }
./a.out Enter string: 0123456789 1234567890