diff --git a/万维调考试题源码/error/10-2.c b/万维调考试题源码/error/10-2.c index 0940bfb..33a194a 100644 --- a/万维调考试题源码/error/10-2.c +++ b/万维调考试题源码/error/10-2.c @@ -29,12 +29,25 @@ char *fun(char input[]) } int outputIndex = 0; /**********Program**********/ - int i; + int i,s,t; for(i=0;i'z'){ + s=s*10+(input[i] - 48); + i++; + } + } + while(s>0){ + t=i; + while(input[t] != ']'){ + output[outputIndex++] = input[t++]; + } + s--; } } + output[outputIndex] = '\0'; /********** End **********/ return output; }