josiftepe

Untitled

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