Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <String.h>
  4.  
  5. void recursivitate(char *s, int n)
  6. {
  7. int i;
  8. if (n == (strlen(s)))
  9. return;
  10. else
  11. {
  12. for ( i = 0; i <= n; i++)
  13. {printf("%c", s[i]);
  14. } printf("\n");
  15. recursivitate(s, n + 1);
  16. }
  17. }
  18.  
  19.  
  20.  
  21.  
  22. int main()
  23. {
  24. char s[20];
  25.  
  26. gets(s);
  27.  
  28. recursivitate(s,0);
  29.  
  30.  
  31.  
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement