摘要: 实验一: #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 typedef struct student { int id; char name[20]; char subject[20]; float perf; 阅读全文
posted @ 2020-12-22 00:33 Lover_1031 阅读(92) 评论(2) 推荐(0) 编辑
摘要: 实验一: #include <stdio.h> const int N=3; int main() { int a[N] = {1, 2, 3}; int i; printf("通过数组名及下标直接访问数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n", 阅读全文
posted @ 2020-12-14 18:48 Lover_1031 阅读(103) 评论(1) 推荐(0) 编辑
摘要: 实验一: 在这个应用中一元二次方程的根不能设计成以函数返回值的方式返回给主调函数,因为函数返回值具有唯一性,一次只能返回一个值,无法返回两个或以上的值。 实验二: #include <stdio.h> long long fac(int n); int main() { int i,n; print 阅读全文
posted @ 2020-11-26 19:34 Lover_1031 阅读(101) 评论(1) 推荐(0) 编辑
摘要: 实验一: #include <math.h> #include <stdio.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f" 阅读全文
posted @ 2020-11-12 19:36 Lover_1031 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 任务一: #include <stdio.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,e,f); return 0; } Li 阅读全文
posted @ 2020-10-30 17:09 Lover_1031 阅读(132) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { printf("my stuno is :202083450096\n未来可期"); return 0; } #include <stdio.h> int main() { while(1) printf("老师最美"); return 阅读全文
posted @ 2020-10-16 17:00 Lover_1031 阅读(51) 评论(0) 推荐(0) 编辑