loading
open in
main.c
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
#include <stdio.h>
 
/* function declaration */
 
int main () {

char my_string[] = "All bees like cheese when they're wearing hats.";
int x = 0;

for (int i = 0; my_string[i] != 0; i++){
		if (my_string[i] == 'e')
      x = x + 1;
}
printf("%d\n",x);


int y = 0;

for (int i = 0; my_string[i] != 0; i++){
		if (my_string[i] == 'b')
      y = y + 1;
}
printf("%d",y);
return 0 ;
}