i have to write a program that deletes special characters from a phone number. For Example:
(0049)5599/85675-344
0049559985675344
i have started to program it, but it doesn't seem to function. here's my code:
#include <stdio.h>
void affe(char nummer[]){
int n , i, z;
n = strlen(nummer) - 1;
for (i = 0; i <= n; i++){
if (nummer[i] < 0 && nummer[i] > 9){
for(z = i; z <= n; z++){
nummer[z] = nummer[z + 1];
}
n--;
}
}
}
int main (){
char nummer[50];
gets(nummer);
affe(nummer);
printf("%s", nummer);
fflush(stdin);
getchar();
return 0;
}
can some1 help me???