Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstring>
- using namespace std;
- int main()
- {char s[256],voc[]="aeiou";
- int i,n,v[5]={0},c;
- cin.get(s,256);n=strlen(s);
- for(i=0;i<=n;i++)
- { if(s[i]>='a'&&s[i]<='z')
- c=s[i];
- else if (s[i]>='A'&&s[i]<='Z')
- c=s[i]+32;
- if(strchr(voc,c)!=0)
- v[strchr(voc,c)-voc]++;
- }
- int maxx=0;
- for(i=0;i<5;i++)
- if(v[i]>maxx){maxx=v[i];c=voc[i]-32;}
- cout<<c;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement