Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int nrc, s;
- char ch, voc[]="aeiouAEIOU";
- int main()
- {
- while(cin>>ch)
- {
- if(isalpha(ch))
- {
- if(!isupper(ch) && !strchr(voc,ch))
- {
- nrc++;
- s+=(int)ch;
- }
- }
- else if(!isspace(ch))
- {
- nrc++;
- s+=(int)ch;
- }
- }
- cout<<(char)(s/nrc);
- return 0;
- }
Add Comment
Please, Sign In to add comment