Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <ctype.h>
- #include <math.h>
- void otstrani_cifri(char * s) {
- char niza_bez_cifri[2000];
- int j = 0;
- for(int i = 0; i < strlen(s); i++) {
- if(!isdigit(s[i])) {
- niza_bez_cifri[j] = s[i];
- j++;
- }
- }
- printf("Vneseniot tekst e %s\n", s);
- printf("Izmenetitot tekst bez cifri e %s\n", niza_bez_cifri);
- }
- int main(int argc, char * argv[]) {
- char s[2000];
- gets(s);
- otstrani_cifri(s);
- }
Advertisement
Add Comment
Please, Sign In to add comment