Pentru Pascal
var s:string;
i,c:integer;
begin
read(s);
c:=0;
for i:=1 to length(s) do
if (c='a') or (c='e') or (c='i') or (c='o') or (c='u') then c:=c+1;
write(c);
end.
Pentru C++
#include <iostream>
using namespace std;
int main()
{
string s;
int c=0;
getline(cin,s);
for (int i=0; i<s.size(); i++)
if ((c=='a') || (c=='e') || (c=='i') || (c=='o') || (c=='u')) c++;
cout << c;
return 0;
}