#include <stdio.h> #include <string.h> int main(){ char str1[80],str2[80]; int len,j=0; gets(str1); len = strlen(str1); for(int i=0;i<len;i++){ if(str1[i]>='0' && str1[i]<='9') str2[j++] = str1[i]; if(str1[i+1]>='0' && str1[i+1]<='9') str2[j++] = '*'; if(i=len-1) str2[j++]='*'; } puts(str2); return 0; } |
Double click to view unformatted code.