Untitled
unknown
plain_text
a year ago
878 B
9
Indexable
#include <iostream>
#include <string>
#include <cstring>
#include <cctype>
using namespace std;
bool samoglaska(char b) {
switch (b){
case 'a': case 'e': case 'i': case 'o': case 'u':
case 'A': case 'E': case 'I': case 'O': case 'U':
return true;
default: return false;
}
}
char mala_bukva(char b) {
if (b>='A' && b<='Z')
return tolower(b);
return b;
}
int main() {
char rec[100];
int brojac=0;
while (cin.getline(rec,100)) {
if (rec=="#") break;
int gol=strlen(rec);
for (int i=0;i<gol;i++) {
char sea=rec[i];
char sl=rec[i+1];
if (samoglaska(sea) && samoglaska(sl)) {
cout<<mala_bukva(rec[i])<<mala_bukva(rec[i+1])<<endl;
brojac++;
}
}
}
cout<<brojac;
return 0;
}Editor is loading...
Leave a Comment