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