Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string s;
- int p1, p2;
- getline(cin, s);
- p1 = s.find_first_of(32);
- p2 = s.find_last_of(32);
- for (int i = p2+1; i < s.length(); i++)
- cout << s[i];
- for (int i = p1; i < p2+1; i++)
- cout << s[i];
- for (int i = 0; i < p1; i++)
- cout << s[i];
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement