Kemija

Author: Pakin Olanraktham & Black Cat


เฉลย
#include <stdio.h>

int main() {
    char s;

    while(1){
        scanf("%c", &s);
        if(s == '\n') return 0;
        printf("%c", s);
        if (s == 'a' || s == 'e' || s == 'i' || s == 'o' || s == 'u') scanf("%c%c", &s, &s);
    }
}
#include <iostream>

using namespace std;

int main() {
    string s;
    getline(cin, s);

    int n = s.size();

    for (int i = 0; i < n; i++) {
        cout << s[i];
        if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u') i+=2;
    }
}