ivana_andreevska

Untitled

May 20th, 2021
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <ctype.h>
  4.  
  5. int broj_soglaski(char *s)
  6. {
  7.     if(*s=='\0')
  8.         return 0;
  9.     else{
  10.         *s=tolower(*s);
  11.         if(isalpha(*s) && (*s!='a') && (*s!='e') && (*s!='i') && (*s!='o') && (*s!='u'))
  12.             return 1 + broj_soglaski(s+1);
  13.         return broj_soglaski(s+1);
  14.     }
  15. }
  16.  
  17. int main()
  18. {
  19.     char niza[101];
  20.     gets(niza);
  21.     printf("%d",broj_soglaski(niza));
  22.     return 0;
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment