Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int test;
- scanf("%d",&test);
- getchar();
- for(int t=1;t<=test;t++){
- char s[1000];
- gets(s);
- int ln = strlen(s);
- int temp = 0;
- int cnt=0;
- for(int i=0;i<ln;i++){
- if(s[i]==' '){
- if(temp==0){
- cnt++;
- }
- temp=0;
- }
- else{
- if(s[i]=='a' || s[i]=='A' || s[i]=='e' || s[i]=='E' || s[i]=='i' || s[i]=='I' || s[i]=='o' || s[i]=='O' || s[i]=='u' || s[i]=='U'){
- temp = 1;
- }
- }
- }
- if(temp==0) cnt++;
- printf("%d\n", cnt);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement