#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;
}
#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;
}
0 Comments