Advertisement
Josif_tepe

Untitled

Jan 16th, 2024
825
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <ctype.h>
  3. #include <string.h>
  4.  
  5. void funkcija(char * s) {
  6.     char s2[1000];
  7.     int j = 0;
  8.     for(int i = 0; i < strlen(s); i++) {
  9.         if(!isdigit(s[i])) {
  10.             s2[j] = s[i];
  11.             j++;
  12.         }
  13.     }
  14.     printf("%s\n", s2);
  15. }
  16. int main(int argc, const char * argv[]) {
  17.     char s[1000];
  18.     fgets(s, 500, stdin);
  19.    
  20.     funkcija(s);
  21.     return 0;
  22. }
  23.  
  24.  
  25. /*
  26.  Prob12en34 tek56st78
  27. */
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement