Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main(void)
- {
- char dubstep[1000], words[1000];
- int len, i, j = 0;
- scanf("%s", dubstep);
- len = strlen(dubstep);
- for(i = 0; i < len;)
- {
- if(dubstep[i] == 'W' && dubstep[i+1] =='U' && dubstep[i+2] =='B') i += 3;
- else
- {
- words[j] = dubstep[i];
- j++;
- i++;
- if(dubstep[i] == 'W' && dubstep[i+1] =='U' && dubstep[i+2] =='B')
- {
- words[j] = ' ';
- j++;
- }
- }
- }
- words[j] = '\0';
- printf("%s", words);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement