Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- char s[100000];
- using namespace std;
- int main()
- {
- int i,cons=0,vocale=0,contr=0,co=1,ok=0;
- cin>>s;
- for(i=0;i<strlen(s);i++)
- {
- if(strchr("bcdfhjklmnpqrstvwxzy",s[i]) || strchr("BCDFHJKLMNPQRSTVWXY",s[i]))
- cons++;
- if(strchr("AEIOU",s[i]) || strchr("aeiou",s[i]))
- vocale++;
- if(strchr("+",s[i]))
- cons++;
- if(strchr("-",s[i]))
- vocale++;
- if(strchr("*",s[i]))
- ok++;
- if(i%5==0)
- {
- i=i-4;
- if(ok==1)
- {if(vocale+cons+ok==5)
- contr++;
- else if(vocale+cons==5)
- contr++;
- vocale=0;
- cons=0;
- ok=0;
- }}}
- cout<<contr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement