1 第 1 题 【程序改错】 功能:先将在字符串s 中的字符按逆序存放到t 串中,然后把s 中的 字符按正序连接到t 串的后面。 例如:当s 中的字符串为:“ABCDE”时,则 t 中的字符串应为: “EDCBAABCDE”。 ------------------------------------------------------*/ #include #include #include void fun (char *s, char *t) { /**********FOUND**********/ int i; sl = strlen(s); for (i=0; i #include /**********FOUND**********/ fun ( int n ) { int a, b, c, k; double s; s = 0.0; a = 2; b = 1; for ( k = 1; k <= n; k++ ) { /**********FOUND**********/ s = (double)a / b; c = a; a = a + b; b = c; } /**********FOUND**********/ return c; } main( ) { int n = 5; printf( "\nThe value of function is: %lf\n", fun ( n ) ); } 答案: 1). double fun(int n) 2). s = s + (double)a / b; 或 s += (double)a / b; 或 s += a /(double)b; 或 s=s+a/(double)b; 3). return s; 第 3 题 【程序改错】 功能:读入一个整数m( 5≤m≤20 ),函数getarr 调用函数rnd 获 得 m 个随机整数,函数sortpb 将这 m 个随机整数从小到大排序。 例如:若输入整数7,则应输出:3 10 17 28 32 36 47。 ------------------------------------------------------*/ #include "conio.h" #include 3 sortpb ( int n,...