Advertisement
Doda94

Untitled

Dec 17th, 2023
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. void BrojSlovaZnamenaka(char *niz, int *brojSlova, int *brojZnamenaka){
  2.     int i = 0;
  3.     while (niz[i]!='\0'){
  4.         if (niz[i] >= 'a' && niz[i] <= 'z')
  5.             *brojSlova += 1;
  6.         else if (niz[i] >= 'A' && niz[i] <= 'Z')
  7.             *brojSlova += 1;
  8.         else if (niz[i] >= '0' && niz[i] <= '9')
  9.             *brojZnamenaka += 1;
  10.        
  11.         i++;
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement