Advertisement
LordMZTE

Untitled

Jun 4th, 2023
788
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include <stddef.h>
  2.  
  3. size_t get_count(const char *s)
  4. {
  5.   int count = 0;
  6.  
  7.   while (*s) {
  8.     switch (*s++) {
  9.         case 'a':
  10.         case 'e':
  11.         case 'i':
  12.         case 'o':
  13.         case 'u':
  14.           count++;
  15.     }
  16.   }
  17.  
  18.   return count;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement