【十二题解】 | #表示数字#
表示数字
http://www.nowcoder.com/practice/637062df51674de8ba464e792d1a0ac6
#include<stdio.h>
int num_judeg(char a){
if(a>='0' && a<='9')return 1;
return 0;
}
int main(){
char data[100]={0};
while(scanf("%s", data) != EOF){
for(int i=0; data[i] != '\0'; i++){
if(num_judeg(data[i]) && (i == 0 || !num_judeg(data[i-1])))printf("*");
printf("%c", data[i]);
if(num_judeg(data[i]) && !num_judeg(data[i+1]))printf("*");
}
printf("\n");
}
}