Advertisement
Guest User

Untitled

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