11 2020 档案

摘要:实验任务1 答:不能。结果过多,不易生成多种类型的返回值。 实验任务2 ex2_1.cpp 修改前 // 利用局部static变量计算阶乘 #include <stdio.h> long long fac(int n); // 函数声明 int main() { int i,n; printf("E 阅读全文
posted @ 2020-11-30 23:18 迷你糖ovo 阅读(93) 评论(1) 推荐(0)
摘要:实验任务1 // 一元二次方程求解 // 重复执行, 直到按Ctrl+Z结束 // #include <math.h> #include <stdio.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("En 阅读全文
posted @ 2020-11-16 22:53 迷你糖ovo 阅读(75) 评论(1) 推荐(0)
摘要:实验任务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 阅读全文
posted @ 2020-11-04 21:24 迷你糖ovo 阅读(210) 评论(1) 推荐(0)