/*Program for counting the number of vowels in a given sentence*/ main() { int i,v; char str[100]; clrscr(); printf("Enter the string : "); gets(str); i=0; v=0; while(str[i]!='\0') { if((str[i]=='A')||(str[i]=='a')||(str[i]=='E')||(str[i]=='e')||(str[i]=='I')||(str[i]=='i')||(str[i]=='O')||(str[i]=='o')||(str[i]=='u')||(str[i]=='U')) v++; i++; } printf("The string has %d Vowels.",v); getch(); }