Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstring>
- #include <stdio.h>
- using namespace std;
- #define VOWELS "aeiou"
- int main() {
- char s[1001];
- gets(s);
- int n = strlen(s);
- for (int i = 0; i < n; i++) {
- if (strchr(VOWELS, s[i]) != NULL) {
- strcpy(s + i + 3, s + i + 1);
- s[i + 1] = 'p';
- s[i + 2] = s[i];
- n += 2;
- s[n] = '\0';
- }
- }
- puts(s);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement