摘要: mission1: #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 2 typedef struct student { int id; char name[20]; char subject[20]; float 阅读全文
posted @ 2020-12-23 14:48 周宜康 阅读(58) 评论(1) 推荐(0) 编辑
摘要: mission1; #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 阅读全文
posted @ 2020-12-16 14:27 周宜康 阅读(90) 评论(0) 推荐(0) 编辑
摘要: mission1:不能,正常返回值只有一个。 mission2: #include <stdio.h> long long fac(int n); int main() { int i,n; printf("Enter n: "); scanf("%d", &n); for(i=1; i<=n; + 阅读全文
posted @ 2020-11-30 22:13 周宜康 阅读(57) 评论(0) 推荐(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", &a, 阅读全文
posted @ 2020-11-18 10:12 周宜康 阅读(49) 评论(0) 推荐(0) 编辑
摘要: #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,e,f); 阅读全文
posted @ 2020-11-04 23:14 周宜康 阅读(53) 评论(1) 推荐(0) 编辑
摘要: printchar:1输出信号,0终止信号 math系列:整形和浮点型的区别 阅读全文
posted @ 2020-10-18 22:58 周宜康 阅读(58) 评论(1) 推荐(0) 编辑