Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- void rm_digits(char *p){
- int found=0;
- while(*p){
- if( (*p>=48)&&(*p<=57) ){
- char *zahl = malloc(sizeof(4));
- zahl=p;
- while( (*zahl!=32) && (*zahl!=46) ){
- printf("%c",*zahl);
- zahl++;
- }
- found++;
- p = zahl;
- free(zahl);
- printf("%c",32);
- }
- p++;
- }
- }
- int main(int argc,char *argv[]){
- char satz []= "Die 17 ist eine bessere Basis der reellen Zahlen als die 42 oder die 123.";
- char *s = satz;
- rm_digits(s);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement