Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- void func(char *str)
- {
- static char new_str[128];
- static int counter = 0;
- if (str[0] && str[1])
- {
- new_str[counter] = *str;
- new_str[counter + 1] = '*';
- str++;
- counter += 2;
- func(str);
- }
- else
- {
- new_str[counter] = *str;
- std::cout << new_str << std::endl;
- }
- }
- int main()
- {
- func("LItBeoFLcSGBOFQxMHoIuDDWcqcVgkcRoAeocXO");
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment