Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstring>
  3. using namespace std;
  4. int main()
  5. {char s[256],voc[]="aeiou";
  6. int i,n,v[5]={0},c;
  7. cin.get(s,256);n=strlen(s);
  8. for(i=0;i<=n;i++)
  9. { if(s[i]>='a'&&s[i]<='z')
  10. c=s[i];
  11. else if (s[i]>='A'&&s[i]<='Z')
  12. c=s[i]+32;
  13. if(strchr(voc,c)!=0)
  14. v[strchr(voc,c)-voc]++;
  15. }
  16. int maxx=0;
  17. for(i=0;i<5;i++)
  18. if(v[i]>maxx){maxx=v[i];c=voc[i]-32;}
  19. cout<<c;
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement