Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main(){
- char str[50], vowel[50]="",consonant[50]="";
- int len,i,c=0,v=0;
- printf("Please enter a word: ");
- gets(s);
- len=strlen(s)
- for (i=0;i<len;i++){
- is(s[i]=='a'||s[i]=='e'||s[i]=='i'||s[i]=='o'||s[i]=='u'){
- vowel[v]=s[i];
- v++
- }
- else{
- consonant[c]=s[i];
- c++
- }
- }
- printf("\nNumber of letters: %d",len);
- printf("\nNumber of vowel: %d->",v);
- puts(vowel);
- printf("Number of consonant:%d->",c);
- puts(consonant);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment