Write a C program to find the total number of vowels in a sentense

#include<stdio.h>
#include<string.h>
int main()
{
char arr[500],d;
int count=0,j=0;
printf("enter any sentence\n");
gets(arr);
while(arr[j]!='\0')
{
d=tolower(arr[j]);
if(d=='a' || d=='e' ||d=='i'||d=='o'||d=='u')
count=count++;
j=j++;
}
printf("the number of vowels in sentence is: %d",count);
return 0;
}

Post a Comment

0 Comments