Advertisement
Josif_tepe

Untitled

Dec 23rd, 2020
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.68 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <ctype.h>
  5. int broj_na_soglaskI(char *niza) {
  6.     if(*(niza) == '\0') {
  7.         return 0;
  8.     }
  9.     char c = *(niza);
  10.     if(isalpha(c) && c != 'a' && c != 'i' && c != 'o' && c != 'u' && c != 'y' && c != 'e') {
  11.         niza++;
  12.         return broj_na_soglaskI(niza) + 1;
  13.     }
  14.     else {
  15.         niza++;
  16.         return broj_na_soglaskI(niza);
  17.     }
  18. }
  19. void print(char *niza) {
  20.     while(*(niza) != '\0') {
  21.         printf("%c ", *(niza));
  22.         niza++;
  23.     }
  24. }
  25. int main()
  26. {
  27.     char niza[101];
  28.     scanf("%s", niza);
  29.    
  30.     printf("%d\n", broj_na_soglaskI(niza));
  31.     return 0;
  32. }
  33. /*
  34.  
  35.  */
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement