Advertisement
Josif_tepe

Untitled

Jan 5th, 2023
862
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <ctype.h>
  4. #include <string.h>
  5.  
  6.  
  7. int main(int argc, const char * argv[]) {
  8.     char s[1000];
  9.     scanf("%s", s);
  10.    
  11.     int broj_na_bukvi_i_cifri = 0;
  12.     for(int i = 0; i < strlen(s); i++) {
  13.         if(isalnum(s[i])) {
  14.             broj_na_bukvi_i_cifri++;
  15.         }
  16.     }
  17.     printf("%d\n", broj_na_bukvi_i_cifri);
  18.     return 0;
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement