11 2020 档案
摘要:实验任务1 答:不能。结果过多,不易生成多种类型的返回值。 实验任务2 ex2_1.cpp 修改前 // 利用局部static变量计算阶乘 #include <stdio.h> long long fac(int n); // 函数声明 int main() { int i,n; printf("E
阅读全文
摘要:实验任务1 // 一元二次方程求解 // 重复执行, 直到按Ctrl+Z结束 // #include <math.h> #include <stdio.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("En
阅读全文
摘要:实验任务1 #include <stdio.h> #include <stdlib.h> int main() { int a=5, b=7, c=100, d, e, f; d = a/b*c; e = a*c/b; f = c/b*a; printf("d=%d, e=%d, f=%d\n",d
阅读全文
浙公网安备 33010602011771号