Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- void v(string s, int n = -2){
- if (n == -2)
- n = s.size() - 1;
- if (n >= 0){
- cout << s[n];
- v(s, n - 1);
- }
- }
- int main(){
- string x;
- getline (cin, x);
- v(x);
- cout << endl;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement