
09.12.2008, 21:01
|
|
Участник форума
Регистрация: 07.07.2008
Сообщений: 161
Провел на форуме: 1027635
Репутация:
234
|
|
~NeiTRoN~
PHP код:
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
string vowels = "aeiou";
int countvowels(const string& s)
{
int res = 0;
for(int i = 0; i < s.length(); i++)
for(int j = 0; j < vowels.length(); j++)
if (s[i] == vowels[j])
res++;
return res;
}
int main()
{
string a;
cin >> a;
cout << a << "\n";
cout << countvowels(a);
cin.get();
return 0;
}
|
|
|