pacozaa

Code1

Feb 4th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <ctype.h>
  4. int main(int argc, char* argv[])
  5. {
  6. int result = 0;
  7. int len = strlen(argv[1]);
  8. for(int i=0; i<len; ++i) {
  9. char c = tolower(argv[1][i]);
  10. if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') {
  11. ++result;
  12. }
  13. }
  14. printf("%d\n", result);
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment