CodePudding user response:
Code to stick,CodePudding user response:
Int main ()
{
Struct
{
Char the chKey;
Int nCount;
}
Vowels [5]=
{
'a', 0,
'e' 0,
'I' 0,
'o' 0,
'u' 0,
};
Char ch=EOF.
While ((ch=getchar ())!=(EOF)
{
for (int i=0; i <5; + + I)
{
If (ch==vowels [I] the chKey
| | ch==vowels [I] the chKey - 'a' + 'a')
{
+ + vowels [I] nCount;
}
}
Ch=EOF.
}
for (int i=0; i <5; + + I)
{
Printf (" '% c' : % d \ r \ n ", vowels [I] the chKey, vowels [I] nCount);
}
system("pause");
return 0;
}