-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path46.c
More file actions
39 lines (39 loc) · 707 Bytes
/
46.c
File metadata and controls
39 lines (39 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <stdio.h>
#include<string.h>
int main()
{
char str[100];
int a,e,i,o,u;
a = e = i = o = u = 0;
int k;
gets(str);
for(k=0;k<strlen(str);k++)
{
if(str[k]== 'a')
{
a = a+1;
}
else if(str[k] == 'e')
{
e = e +1;
}
else if(str[k] == 'i')
{
i = i +1;
}
else if( str[k] == 'o')
{
o = o + 1;
}
else if(str[k] == 'u')
{
u = u+1;
}
}
printf("a :%d\n",a);
printf("e :%d\n",e);
printf("i :%d\n",i);
printf("o :%d\n",o);
printf("u :%d\n",u);
return 0;
}