Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(int argc, char **argv)
- {
- char str[100];
- char *ch;
- int n, vowel,consonent;
- vowel = 0;
- consonent = 0;
- ch = str;
- gets(str);
- for(n=0; ch[n]; n++){
- if( ch[n] == 'a' || ch[n] == 'e' || ch[n] == 'i' || ch[n] == 'o' || ch[n] == 'u')
- vowel++;
- else{
- consonent++;
- }
- }
- printf("vowel = %d\nconsonent = %d\n", vowel, consonent);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement