Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <ctype.h>
- int main(int argc, char* argv[])
- {
- int result = 0;
- int len = strlen(argv[1]);
- for(int i=0; i<len; ++i) {
- char c = tolower(argv[1][i]);
- if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') {
- ++result;
- }
- }
- printf("%d\n", result);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment