Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- #include<string.h>
- int main()
- {
- char str[25],a;
- int count=0,i;
- printf("Enter a word:");
- scanf("%d",&str);
- a=strlen(str);
- for(i=0; i<a; i++){
- if(strcmp(str,'a')==0)
- count++;
- else if(strcmp(str,'e')==0)
- count++;
- else if(strcmp(str,'i')==0)
- count++;
- else if(strcmp(str,'o')==0)
- count++
- else if(strcmp(str,'u')==0)
- count++;
- else
- count = count + 0;
- }
- printf("The number of vowels is %d",count);
- printf("The number of consonznts is %d",strlen-count);
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement