Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- const char* vowels = "aeiouy";
- char text[1024], *word, go;
- int tmp;
- word = text;
- while(1)
- {
- scanf("%s", word);
- go = !strchr(word, '.');
- if((tmp = strcspn(word, vowels)) != strlen(word))
- {
- word += tmp;
- word++;
- while(1)
- {
- if((tmp = strcspn(word, vowels)) == strlen(word))
- {
- break;
- }
- word += tmp;
- *word = 'u';
- word++;
- }
- }
- word += strlen(word);
- if(!go)
- {
- break;
- }
- *word = ' ';
- word++;
- }
- *word = '\0';
- printf("%s\n", text);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment