摘要: 3.正确输出 生成了 正确 直观可读 4.正确输出了 正确生成了 不直观可读 #include <stdio.h> #include <stdlib.h> #define N 10 typedef struct student { int num; char name[20]; int score; 阅读全文
posted @ 2020-12-29 17:11 pyjjjjjj 阅读(65) 评论(1) 推荐(0)
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 // 运行程序输入测试时,可以把N改小一些输入测试 typedef struct student { int id; /*学生学号 */ char name[20] 阅读全文
posted @ 2020-12-21 14:54 pyjjjjjj 阅读(60) 评论(2) 推荐(0)
摘要: #include <stdio.h> const int N=3; int main() { int a[3] = {1, 2, 3}; int i; printf("通过数组名及下标直接访问数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n", &a[i] 阅读全文
posted @ 2020-12-15 23:05 pyjjjjjj 阅读(77) 评论(1) 推荐(0)
摘要: 1.函数的返回值只能有一个,而一元二次方程可能有两个根。 2. #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-12-05 16:57 pyjjjjjj 阅读(135) 评论(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",&a,&b,&c) !=EO 阅读全文
posted @ 2020-11-17 23:04 pyjjjjjj 阅读(91) 评论(1) 推荐(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; } d=5/7*100 e=5*100/7 f 阅读全文
posted @ 2020-10-31 15:49 pyjjjjjj 阅读(73) 评论(2) 推荐(0)
摘要: #include <stdio.h> #include<stdlib.h> int main(){ printf("my stuno is:202083290292\nhello2020"); system("pause"); return 0; } #include<stdio.h> int ma 阅读全文
posted @ 2020-10-17 14:23 pyjjjjjj 阅读(112) 评论(1) 推荐(0)
点击右上角即可分享
微信分享提示