#include<stdio.h>
#include<string.h>
main()
{
char s[25];
int i,v=0,c=0;
printf("Enter string--");
#include<string.h>
main()
{
char s[25];
int i,v=0,c=0;
printf("Enter string--");
scanf("%s",&s);
for(i=0;s[i]!='\0';i++)
(s[i]=='a'||s[i]=='e'||s[i]=='i'||s[i]=='i'||s[i]=='o'||s[i]=='u')?v++:c++;
printf("the count of v is %d \n the count of c is %d",v,c);
getch();
}
for(i=0;s[i]!='\0';i++)
(s[i]=='a'||s[i]=='e'||s[i]=='i'||s[i]=='i'||s[i]=='o'||s[i]=='u')?v++:c++;
printf("the count of v is %d \n the count of c is %d",v,c);
getch();
}
output
Enter string--
this
the count of v is 1
the count of c is 3
the count of v is 1
the count of c is 3
0 comments:
Post a Comment