|
[code] # include<stdio.h> # include<conio.h>
main() int vowel=0,consonant=0,number=0; clrscr
printf("\n\n"); printf("\n"CHARACTER DETERMINER Version 1.0"); printf("\n"); printf("Enter a Phrase :"); string sent=in.next(); char sentence1[]=sent.tocharArray(); for (int index=0;index<sentence1.length;index++) scanf("%d%d%d",consonant,vowel,number");
{ switch(sentence1[k]) { case 'a': case 'e': case'i': case'o': case'u': case'A': case'E': case'I': case'O': case'U'; vowel++; case'0': case'1': case'2': case'3'; case'4'; case'5': case'6': case'7': case'8': case'9': numbers++; break; default; consonant++; break; k++;
} printf("\n\n"); printf("=================") print("DETAILED RESULT"); printf("================="); printf("\n); printf("there are "+%d+"vowel(s) in your sentence."); printf("There are "+%d+"consonant in your sentence."); printf("There are "+%d+"number in your sentence."); printF("\n");
getche(); }
|