改错题
1)修改程序cmody591.c,按每行10个数的形式输出[10,99]区间内满足“个位数与十位数之积大于它们之和”的所有整数。例如:
整数38,个位数与十位数之积24(3×8)大于它们之和11(3+8)#include
#include
void main()
{ int i,j,k,s,n=0;
for(i=10;i<100;i++)
{ /**/ k=0; /**/
s=0;
j=i;
while(j)
{ k*=j%10;
s+=j%10;
/**/ j=j%10 /**/;
}
if(/**/ k
{ if(n%10==0) printf("\n");
n++;
printf("%-5d",i);
}
}
printf("\n");
getch();
}
cmody591.c
/**/ k=1; /**/
/**/ j=j/10 /**/
/**/ k>s /**/
2)修改程序cmody592.c,使函数pnt(int a[M][M], int n),根据参数n(1 当n=6时,输出: 1113 15 17 19 21 2223 24 25 26 27 3335 37 39 41 43 4445 46 47 48 49 5557 59 61 63 65 6667 68 69 70 71 当n=3时,输出: 1113 15 2223 24 3335 37 #include #include #define M 9 void pnt(int a[M][M],int n) { int /**/i,j /**/; for(i=0;i { s=(i+1)*11; for(j=0;j { if(i%2==0) a[i][j]=s+2*j; else a[i][j]=/**/ s+j+1 /**/; } } printf("array a(n=%d) is:\n",n); for(i=0;i { for(j=0;j printf("\n"); } } void main() { int a[M][M]; int n; do { printf("Please input n(1 scanf("%d",&n); }while(n<=1 || n>=10); pnt(/**/ a[ ]/**/,n); getch(); } cmody592.c /**/i,j,s /**/ /**/ s+j /**/ /**/ a/**/ 3)修改程序cmody601.c,使字符串中所有大写的英文字母转换为小写英文字母(其它字符不变)。例如: 原字符串:g@O355o6D LuCk! 被转换成:g@o35506d luck! #include #include #include void main() { char src[80],tag[80]; int i; /**/ i='0'; /**/ printf("Please input source string: "); gets(src); strcpy(tag,src); while(/**/ tag[i]=='\0' /**/) { if(tag[i]>='A' && tag[i]<='Z') /**/ tag[i]-=32; /**/ i++; } printf("\nThe source string: %s\n",src); printf("The target string: %s\n",tag); getch(); } cmody601.c /**/ i=0; /**/ /**/ tag[i]!='\0' /**/ /**/ tag[i]+=32; /**/ (4)修改程序cmody602.c,使函数p_swap( )利用指针变量实现函数main( )中两个变量值的交换。例如: 输入:23,78 显示:Original a=23, b=78 Now a=78, b=23 #include #include void p_swap(int *x,int *y) { int /**/ t /**/; temp=*y; *y=/**/ x /**/; *x=temp; } void main() { int a,b; printf("Input a,b:"); scanf("%d,%d",&a,&b); printf("Original a=%d, b=%d\n",a,b); p_swap(&a,/**/ b /**/); printf("Now a=%d, b=%d\n",a,b); getch(); } cmody602.c /**/ temp /**/ /**/ *x /**/ /**/ &b /**/ (5)修改程序cmody611.c,已知圆柱体底面圆的半径r,从键盘输入圆柱体的高h,若h>=0,则根据以下公式求圆柱体的体积,否则提示出错信息。 result=2 PI h, 其中, 3.14 *r* PI #include #include #define /**/ PI=3.14 /**/ void main() { float r=5.0,h,result; printf("Please input h:"); scanf("%f",/**/ h /**/); if(/**/ h<0 /**/) { result = PI*r*r*h; printf("The result is:%.2f\n",result); } else printf("Error!\n"); getch(); } cmody611.c /**/ PI 3.14 /**/ /**/ &h /**/ /**/ h>=0 /**/ 6)改错题cmody612.c,使函数arrayclass(int a[ ])完成如下功能: (1)遍历数组a,找出其中做大值max和最小值min; (2)再次遍历数组a 进行元素归类,若元素与max差值的绝对值小于其与min 差值的绝对值,则将该元素存入数组max_class中,否则存入数组min_class中; (3)变量n_max和n_min分别表示存入数组max_class和min_class的元素个数。#include #include #include #define N 15 void arrayclass(int a[ ]) { int max_class[N], min_class[N]; int i, max, min, n_max, n_min; /**/ n_max=0 /**/; max=min=a[0]; for(i=1;i { if(max if(min>a[i]) min=a[i]; } for(i=0;i { if( fabs(a[i]-max) < fabs(a[i]-min) ) { max_class[n_max]=a[i]; n_max++; } else { min_class[n_min]=a[i] ; /**/ n_min-- /**/; } } printf("\n max is :%d\n",max); printf(" Array of max_class is:\n"); for(i=0;i printf("%5d",max_class[i]); printf("\n min is :%d\n",min); printf(" Array of min_class is:\n"); for(i=0;/**/ i<=n_min /**/; i++) printf("%5d",min_class[i]); } void main() { int a[N] = {13,24,0,-12,18,29,-8,32,7, 20,3,10,16,-3,26}; arrayclass(a); getch(); } cmody612.c /**/ n_max=n_min=0 /**/ /**/ n_min++ /**/ /**/ i 7) 修改程序cmody621.c,实现求满足 13000 n i i = > ∑的最小正整数n。 #include void main() { int i=1,sum=0; while(/**/ sum>3000 /**/) { /**/ sum=i; /**/ i++; } printf("1+2+3+4+...+%d=%d\n",/**/ i /**/,sum); getch(); } cmody621.c /**/ sum<=3000 /**/ /**/ sum+=i; /**/ /**/ i-1 /**/ 8) 修改程序cmody622.c, 使函数fun(char *p, char *q)完成如下功能: 将p所指字符串中的字符逐个复制到q所指字符串中,在每4个字符之后插入1个空格(注:若遇空格字符则重新累计字符个数)。例如, 输入:ABC DEFGHI JKL MNOPQRS 输出:ABC DEFG HI JKL MNOP QRS #include #include void fun(char *p, char *q ) { int n, i; /**/ i=1; /**/ while(*p) { n=1; while(n<=4 && *p) { q[i++]=*p; if(*p==' ') /**/ n=1; /**/ p++; n++; } if(*p) { if(*p!=' ') q[i++]=' '; else { q[i++]=*p; p++; } } } /**/ q[i]='0' /**/; } void main() { char str_a[80],str_b[80]; printf("Enter a string:"); gets(str_a); printf("The original string is: \n"); puts(str_a); fun(str_a,str_b); printf("The string after insert space is: \n"); puts(str_b); getch(); } cmody622.c /**/ i=0; /**/ /**/ n=0; /**/ /**/ q[i]='\0' /**/ 9)改错题cmody631.c,实现任意输入一个年份和月份,输出该月有多少天。提示: (1)二维数组day的第1行存放非闰年每个月的天数,第二行存放闰年每个月的天数; (2)判断输入年份是否为闰年,若是则从day的第2行获取对应的月份天数,否则从day 的第一行获取对应的月份天数。 #include #include void main() { int /**/ day /**/={{31,28,31,30,31, 30,31,31,30,31,30,31}, {31,29,31,30,31,30,31,31,30,31,30, 31}}; int year,month,/**/ flag=1 /**/; printf("Please input year:"); scanf("%d",&year); printf("Please input month:"); scanf("%d",&month); if(year%400==0 || year%4==0 && year%100!=0) flag=1; printf("Days of the month is %d.",/**/ day[flag][month] /**/); printf("\n"); getch(); } cmody631.c /**/ day[2][12] /**/ /**/ flag=0 /**/ /**/ day[flag][month-1] /**/ (10) 修改程序cmody632.c,使函数pattern(int n)根据参数n(1 当n=5时: * *#* *#*#* *#*#*#* *#*#*#*#* 当n=4时: * *#* *#*#* *#*#*#* #include #include void pattern(/**/ int /**/) { int i,j,space; for(i=1;/**/ i { for(space=1;space<=20-i;space++) printf(" "); for(j=1;j<=2*i-1;j++) { if(/**/ j%2==0 /**/) printf("*"); else printf("#"); } printf("\n"); } } void main() { int n; do { printf("Please input n(1 scanf("%d",&n); }while(n<=1 || n>=10); pattern(n); getch(); } cmody632.c /**/ int n /**/ /**/ i<=n /**/ /**/ j%2!=0 /**/ 11)修改程序cmody491.c, 计算满足以下条件的整数n的最大值。 ? + + ? + - + n ?n ? + 2 5 ( )1 1000 ? 4 1< 4 2 3 3 #include #include void main() { int n=1, sum=0; /**/ if(sum<1000) /**/ { sum+=n*(n+1); n++; } printf("n=%d\n",/**/ n /**/); getch(); } cmody491.c /**/ while(sum<1000) /**/ /**/ n-1 /**/ 12)修改程序cmody492.c,实现从键盘输入一串字符和整数n,若n小于字符 串长度则从字符串右侧开始截取n个字符,否则显示无法运行。 例如:输入的字符串为”Professor”,n=3,则截取的子串为”sor”。 #include #include #include void main() { char str[100],sub[100]; int n,len,i; printf("Enter string:"); gets(str); printf("\nEnter n:"); scanf("%d",&n); len=strlen(str); if( n>len ) printf("Can't run with %d !\n",n); else { /**/ i=1; /**/ while(i { /**/ sub[i]=str[n+i]; /**/ i++; } /**/ sub[i]='\n'; /**/ printf("\nsub string is:%s\n",sub); } getch(); } cmody492.c /**/ i=0; /**/ /**/ sub[i]=str[len-n+i]; /**/ /**/ sub[i]='\0'; /**/ 13)修改程序cmody501.c,输出总分最高学生的姓名和总分(8位学生的姓名和两科成绩已存储在结构体数组中)。 #include #include struct student { char name[10]; float score[2]; }; void main() { /**/ student stu[8] /**/={{"Mary",76,85}, {"John",85,90},{"Tom",81,78},{"Susa",87,67},{"Wilu",79,98},{"Yili",65,63},{"Son mu",73,82},{"Lichar",70,71}}; int i=0,p; float total, max=0; while(i<8) { total=/**/ stu[i].score[1]+stu[i].score[2]; /**/ if(total>max) { max=total; p=i; } i++; } printf("\n Best is %s, ",stu[p].name); printf("Total=%.1f \n", /**/ total /**/); getch(); } cmody501.c /**/ struct student stu[8] /**/ /**/ stu[i].score[0]+stu[i].score[1]; /**/ /**/ max /**/ 14)修改程序cmody502.c,使函数find(int a[ ]) 计算数组a各元素的平均值,以及每个元素与该平均值的差,并返回差的绝对值的最大值。 #include #include #include #define N 10 double find(int a[]) { int i; double max,/**/ aver=1 /**/; for(i=0;i aver+=a[i] ; /**/ aver=N /**/; max=fabs(a[0]-aver); for(i=1; i if(fabs(a[i]-aver)>max) max= fabs(a[i]-aver) ; return(/**/ aver /**/); } void main() { int arr[N]={11,23,15,27,9,20,18,16,24,22}; printf("Result is %lf.\n",find(arr)); getch(); } cmody502.c /**/ aver=0 /**/ /**/ aver/=N /**/; /**/ max /**/ 15)修改程序cmody511.c,实现从键盘输入10个100以内互不相同的正整数,输出其中第二大的数 #include #include void main() { int i,/**/ max1=max2=0 /**/; int s[10]; printf("Please input 10 numbers:\n"); for(i=0;i<10;i++) { scanf("%d",&s[i] ); if(s[i]>max1) { /**/max2=s[i];/**/ max1=s[i]; } else if(s[i]>max2) { max2=s[i]; } } printf("\n%d\n",/**/ s[i] /**/); getch(); } cmody511.c /**/ max1=0, max2=0 /**/; /**/max2=max1;/**/ /**/ max2 /**/ 16)修改程序cmody512.c,实现将升序排列数组a与b的元素按升序存入数组c中。 #include #include void main() { int a[5]={3,7,8,15,18}; int b[6]={-3,0,5,9,19,36}; int c[11]; /**/ int i,j; /**/ i=j=k=0; while(i<5 && j<6) { if(a[i]<=b[j]) { c[k]=a[i] ; /**/ k--; /**/ i++; } else c[k++]=b[j++]; } while(i<5) c[k++]=a[i++]; while(j<6) c[k++]=/**/ b[j--] /**/; printf("\nArray a:\n"); for(i=0;i<5;i++) printf("%3d ",a[i]); printf("\nArray b:\n"); for(j=0;j<6;j++) printf("%3d ",b[j]); printf("\nArray c:\n"); for(k=0;k<11;k++) printf("%3d ",c[k]); printf("\n"); getch(); } cmody512.c /**/ int i,j,k; /**/ /**/ k++; /**/ /**/ b[j++] /**/; 17)修改程序cmody521.c,实现从键盘输入一个仅包含‘0’、‘1’的字符串,输出其中仅含‘0’的最长子串的长度和这种子串第一次出现的起始位置(第几个字符)。 例如: 输入:0011101000010100001 输出:4 8 #include #include #include void main() { char c; int i , len, p, maxlen=0; i=0; /**/ len=10; /**/ printf("\nPlease input the string: "); while((c=getchar())!='\n') { i++; if/**/ (c='1') /**/ len++; else { if(len>maxlen) { maxlen=len; /**/ p=i; /**/ } len=0; } } printf("\n%d %d",maxlen,p); getch(); } cmody521.c /**/ len=0; /**/ /**/ (c=='0') /**/ /**/ p=i-maxlen; /**/ 18)有1020本挂历,第一天卖一半另加至多两本,半本挂历按四舍五入整为一本,以后每天均按此规则销售。修改程序cmody522.c,使函数days(int n)返回卖完这些挂历所需要的天数。 #include #include int days( int n ) { /**/ int rst,dy=1; /**/ while(n>0) { rst=/**/ (n-2)/2 /**/; n=rst; dy++; } return (/**/ n /**/); } void main() { printf("days= %d\n", days(1020)); getch(); } cmody522.c /**/ int rst,dy=0; /**/ /**/ n/2-2 /**/ /**/ dy /**/ 19)修改程序cmody531.c,实现输入一个字符串(长度不超过100个字符),只保留其中字母和数字字符,将其余字符删除后输出。例如: 输入:aS?1%q95R/w0# 输出:aS1q95Rw0 #include #include #include void main() { char str[100]; char c; int i; i=0; printf("\nPlease input the string: "); while((c=getchar())!='\n') { if(c>='A'&&c<='Z'||c>='a'&&c<='z'||/**/ c>=0 &&c<=9 /**/) /**/ str[i]=c; /**/ } /**/ str[i]='\n'; /**/ puts(str); getch(); } cmody531.c /**/ c>='0' &&c<='9' /**/ /**/ str[i++]=c; /**/ /**/ str[i]='\0'; /**/ 20)修改程序cmody532.c,实现如下图形的输出。 1 2 3 4 5 0 1 2 3 4 0 0 1 2 3 0 0 0 1 2 0 0 0 0 1 #include #include #define N 5 void main() { int /**/ arr(N,N) /**/; int i,j; for(i=0;i { for(j=0;j { if(j arr[i][j]=/**/ 1 /**/; else arr[i][j]=/**/ j-i /**/; printf("%3d",arr[i][j]); } printf("\n"); } getch(); } cmody532.c /**/ arr[N][N] /**/ /**/ 0 /**/ /**/ j-i+1 /**/ 21. 修改程序Cmody541.c中的错误,实现将键盘输入字符串中的’1’~’9’转换成比它小1的数字字符,‘0’转换成‘9’。如 输入:ab50cd89EF34GH43 输出:ab49cd78EF23GH32 #include #include main() { char s1[100], s2[100]; int i,s_len; printf("Please input string: \n"); gets(s1); s_len = strlen(s1); for(/**/i=1; /**/ i { if( s1[i] >= '1' && s1[i] <= '9') /**/s2[i]--;/**/ else if( /**/ s1[i] =0/**/) s2[i] = s1[i]+9; else s2[i] = s1[i]; } s2[i] = '\0'; puts(s2); getch(); } cmody541.c /**/i=0; /**/ /**/s2[i]=s1[i]-1;/**/ /**/ s1[i] =='0'/**/ 22. 修改程序Cmody542.c,其中函数fun( )将0、1字符串表示的二进制数转换成对应的十进制数,并返回转换结果。如: 输入字符串:10100111 输出结果:167 #include int fun( char *p ) { int y; /**/ y=1; /**/ while(*p!='\0') {y=y*2+*p-'0'; /**/ y++ /**/; } return(/**/ 0 /**/); } void main() { char str_b[9]; printf("Enter binary string: "); gets(str_b); printf("\nDecimal is: %d\n",fun(str_b) ); getch(); } cmody542.c /**/ y=0; /**/ /**/ p++ /**/; /**/ y /**/ 23. 程序Cmody551.c,计算满足下列条件的所有零件数,保存到数组num[100]中。有一堆零件,总数在100到500之间并且满足:若按5个零件进行分组,则最后多出3个;若按7个零件分组,则多出2个。 #include void main() { int/**/ i,num[100];/**/ count=0 ; for( i=100;i<=500;i++ ) if( /**/i%5 =0 && i%7=0 /**/) { /**/num[i]=i;/**/ count++; } for(i=0; i printf("%5d", num[i]); getch(); } cmody551.c /**/ i, count, num[100];/**/ /**/i%5 ==3 && i%7==2 /**/ /**/num[count]=i;/**/ 24. 修改程序Cmody552.c,其中函数Is_Prime(int x)用于判断x::若x 0则返回值为-1;x>0则判断其是否为素数,若是返回值为1,否则返回值为0. #include #include /**/ integer /**/Is_Prime( int x ) { int /**/ i/**/; if(x<=0) return(-1); else { k=(int)sqrt((double)x); for(i=2;i<=k;i++) if(x%i== /**/ 1 /**/) {return(0); } return (1); } } void main() { int a; printf("Input a number: "); scanf("%d",&a); printf("%d\n", Is_Prime(a)); getch(); } cmody552.c /**/ int /**/ /**/ i,k/**/; /**/ 0/**/ 25. 程序Cmody561.c ,计算如下数字表达式: 1 1112-++-+=y y x x x #include void main() { float x,y; /**/ int result; /**/ printf("\nPlease input x,y: "); scanf( "%f%f" ,&x,&y); while(/**/ x==1 && y==1 /**/) { printf("Error :Divided by zero!"); printf("\nPlease input x,y: "); scanf("%f%f",&x,&y); } result= (x*x+1)/(x-1)+(y+1)/(y-1); printf("\nResult=%.2f\n",result); getch(); } cmody561.c /**/ float result; /**/ /**/ x==1 || y==1 /**/ 26. 修改程序Cmody562.c ,其中函数fun_time(int x[ ],int n,int y)将数组x 中每个元素值依次乘以y 。 #include void fun_time(int x[],int n,/**/ y /**/) { int i; for(i=0;/**/ i>n /**/; i++ ) x[i]*=y; } void main() { int a[10]={12,4,6,9,0,-2,3,10,-6,19}; int i,k; printf("Input a multiplier:"); scanf("%d",&k); fun_time(/**/ a[1] /**/,10,k); printf("Now array a is:"); for(i=0;i<10;i++) printf("%4d",a[i]); printf("\n"); getch(); } cmody562.c /**/ int y /**/ /**/ i /**/ a /**/ 27. 程序Cmody571.c,其中的函数chg_str(char s[ ])将字符串中所有偶数位置上的大写字母转换为小写字母。(注:首位为奇数位。) 如:字符串khAB58fDR?!KM将转换为khAb58fdR?!kM #include void chg_str(/**/ s[] /**/) { int i; for(i=0;s[i]!='\0';i++) {if ((/**/ s[i]>='a' /**/ && s[i]<='Z' ) && i%2) /**/ s[i]=s[i]-32; /**/ } } main() { char str_s[100]; printf("Enter string: "); 程序改错------------------------------------- 1题目:在一个一维整型数组中找出其中最大的数及其下标。 程序中共有4条错误语句,请改正错误。 -----------------*/ #define N 10 /**********FOUND**********/ float fun(int *a,int *b,int n) { int *c,max=*a; for(c=a+1;cmax) { max=*c; /**********FOUND**********/ b=c-a;} return max; } main() { int a[N],i,max,p=0; printf("please enter 10 integers:\n"); for(i=0;i 下列程序是建立一个包含学生有关数据的单向链表。但该程序有2个错误,错误出现在每个注释行附近,请调试改正。调试改正中,不得改变程序结构,也不得增删语句。 #define NULL 0 struct stud { long num; char name[10]; float score; struct stud *next; }; /* …………… comment …………… */ int n; struct stud create() 序中有两处错误代码,请改正.注意,不得改变程序结构。 #include <> main() { int a[8],*p=a; int i,j; int tempmin,tempcode; printf("\n input the numbers:\n"); for (i=0;i<8;i++) scanf("%d",p+i); tempmin=*p; for (i=0;i<7;i++) { for (j=i;j<8;j++) if (j==i||*(p+j) 【程序改错】 1.功能:利用递归函数调用方式,将所输入的5个字符,以相反顺序 打印出来。 char next; next=getchar(); palin(n-1); 2.功能:求广义菲玻那契级数的第n项。广义菲玻那契级数的前n 项为: 1,1,1,3,5,9,17,31,…… 项值通过函数值返回 main ( )函数。 例如:若 n = 15,则应输出:The value is: 2209。 for (k=4; k<=n; k++) a=b; return d; 3.功能:根据整型形参m,计算如下公式的值: y=1/2+1/8+1/18+...+1/2m*m double y=0.0; 4.功能:编制统计营业员一天的营业额的程序,设程序采用一个循环 实现,每次循环输入一笔交易金额并累计营业额。由于营 业员一天完成的交易次数是不确定的,为此以最后附加输 入一笔0或负数交易额作为交易金额已全部输入结束的标志。 float sale,sigma; scanf("%f",&sale); sigma=sigma+sale; 5.功能:读取7个数(1-50)的整数值,每读取一个值,程序打印出该值个数的*。while(n<8) while(a<1||a>50); for(i=0;i 1、以下程序的功能是求如下表达式: 1 1 1 S = 1 + ——+ ———+ ...... + ——————— 1+2 1+2+3 1+2+3+......+n 『答案』:1 scanf("%d",&n); 2 float fun(int n) 3 for(i=1;i<=n;i++) 4 s+=1.0/t 或s= s + 1.0 /t; 2、题目:函数fun的功能是:根据整型形参m的值,计算如下公式的值。 1 1 1 t = 1- ——- ——- ... - —— 2x2 3x3 mxm 例如,若m=5,则应输出:0.536389 『答案』:1 for(i=2;i<=m;i++)或for(i=2;i 第12次上机程序改错第1题 【程序改错】 -------------------------------------------------------- 功能:求二分之一的圆面积,函数通过形参得到圆的半径,函数返回二分之一的圆面积。 例如:输入圆的半径值:19.527 输出为:s = 598.950017。 ------------------------------------------------------*/ #include printf ( "Enter x: "); scanf ( "%f", &x ); printf (" s = %f\n ", fun ( x ) ); } 第2题【程序改错】 功能:先将在字符串s中的字符按逆序存放到t串中,然后把s中的字符按正序连接到t串的后面。 例如:当s中的字符串为:“ABCDE”时,则t中的字符串应为:“EDCBAABCDE”。 ------------------------------------------------------*/ #include (一)功能:用选择法对数组中的n个元素按从小到大的顺序进行排序。#include "stdio.h" #define N 20 void fun(int a[], int n) { int i, j, t, k; for (j = 0 ;j < n-1 ;j++) { /**********ERROR**********/ k = j for (i = j+1;i < n; i++) /**********ERROR**********/ if(a[i] >a[k]) /**********ERROR**********/ k=j; t = a[k] ; a[k] = a[j] ; a[j] = t; } } main() { int a[N]={9,6,8,3,-1},i, m = 5; printf("排序前的数据:") ; for(i = 0;i < m;i++) printf("%d ",a[i]); printf("\n"); fun(a,m); printf("排序后的数据:") ; for(i = 0;i < m;i++) printf("%d ",a[i]); printf("\n"); } 【参考答案】 k = j; 【参考答案】 if(a[i] < a[k]) if(a[k] > a[i]) 【参考答案】 k = i; (二)功能:求广义菲玻那契级数的第n项。广义菲玻那契级数的前n 项为: 1,1,1,3,5,9,17,31,…… 项值通过函数值返回 main ( )函数。 例如:若 n = 15,则应输出:The value is: 2209。 #include "conio.h" #include "stdio.h" long fun ( int n ) { long a=1, b=1, c=1, d=1, k; /**********ERROR**********/ for (k=4; kc语言程序改错题
C语言程序改错及填空题
c语言程序改错
C语言程序改错2
C语言程序改错题
程序改错完整版---C语言
齐齐哈尔大学C语言题库 程序改错(部分)