Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int count_vowe(const char *text) {
- const char *ch = text;
- int count = 0;
- for (; *ch != '\0'; ch++) {
- switch (*ch) {
- case 'a':
- case 'e':
- case 'i':
- case 'o':
- case 'u':
- case 'A':
- case 'E':
- case 'I':
- case 'O':
- case 'U':
- count++;
- }
- }
- return count;
- }
- int main(void) {
- printf("vowe = %d\n", count_vowe("aeiou"));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement