zad1
gorazd
c_cpp
a year ago
569 B
5
Indexable
2kolok_SP
#include <iostream>
#include <cctype>
#include <cstring>
using namespace std;
bool isVowel(char c) {
c = tolower(c);
return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
}
int main() {
char s[200];
int counter = 0;
while (cin.getline(s, 200)) {
if (*s=='#')
break;
for (int i = 0; i < strlen(s); i++) {
if (isVowel(s[i]) and isVowel(s[i+1])) {
cout<<(char)tolower(s[i])<<(char)tolower(s[i+1])<<endl;
counter++;
}
}
}
cout<<counter;
}Editor is loading...
Leave a Comment