Vowel count

Back to General discussions forum

mewallace     2018-01-26 04:36:25

This is my solution. Can someone help me with this problem?

include<stdio.h>

include<string.h>

int main() { int n,i,j,b,p=0; scanf("%d\n",&n); for(i=0;i<n;i++) { char a[1000];

gets(a); b=strlen(a); for(j=0;j<b;j++) { if(a[j]=='a'||a[j]=='e'||a[j]=='i'||a[j]=='o'||a[j]=='u'||a[j]=='y') p++; }

printf("%d ",p); } return 0; }

Please login and solve 5 problems to be able to post at forum