Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5. void rec(string s, int pos){
  6. if(pos == s.size()){
  7. return;
  8. }
  9. cout << s[pos] << endl;
  10. rec(s, pos + 1);
  11. }
  12. int main()
  13. {
  14. string s;
  15. cin >> s;
  16. rec(s, 0);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement