Question B.
#include <bits/stdc++.h>
using namespace std;
int main()
{
string str;
getline(cin, str);
map<char,int>mp;
for(int i=0;i<[Link]();i++){
mp[tolower(str[i])]++;
}
for(auto x:mp){
// cout<<[Link]<<" "<<[Link]<<endl;
if([Link]=='a'||[Link]=='e'||[Link]=='i'||[Link]
=='o'||[Link]=='u'){
if([Link](char([Link]+1))!=[Link]()){
// cout<<char([Link]+1)<<endl;
mp[char([Link]+1)]+=mp[[Link]];
}
else{
mp[char([Link]+1)]=[Link];
}
}
}
int mx=INT_MIN;
for(auto x:mp){
// cout<<[Link]<<" "<<[Link]<<endl;
mx=max(mx,[Link]);
}
char ch;
for(auto x:mp){
if(mx==[Link] &&
!([Link]=='a'||[Link]=='e'||[Link]=='i'||[Link]=='o'||x.
first=='u')){
ch=[Link];
}
}
cout<<ch<<endl;
return 0;
}
2. OUTPUT :
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! [Link]
PS F:\c++> cd "f:\c++\" ; if ($?) { g++ [Link] -o consonent } ; if ($?) { .\consonent }
paragliding
PS F:\c++>