摘要: 实验三 1.出现了分数有高到低的排序 2.出现了文件,直观可读 实验四 1.出现了file4.dat文件,正确打开,但不直观可读 2. #include <stdio.h> #include <stdlib.h> #define N 10struct student { int num; char 阅读全文
posted @ 2020-12-27 20:47 微风间凉雨 阅读(57) 评论(2) 推荐(0)
摘要: // P280例8.15 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include<stdio.h> #include<stdlib.h> #include<string.h> #define N 3 // 运行程序输入 阅读全文
posted @ 2020-12-17 21:38 微风间凉雨 阅读(76) 评论(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-09 10:57 微风间凉雨 阅读(56) 评论(1) 推荐(0)
摘要: 实验二: #include<stdio.h> long long fac( int n ); int main() { int i,n; printf("Enter n:"); scanf("%d",&n); for( i=1;i<=n;++i ) { printf("%d!=%11d\n",i,f 阅读全文
posted @ 2020-12-03 21:21 微风间凉雨 阅读(98) 评论(1) 推荐(0)
摘要: #include<stdio.h> #include<math.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) ! 阅读全文
posted @ 2020-11-15 10:26 微风间凉雨 阅读(113) 评论(2) 推荐(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=500/7,e= 阅读全文
posted @ 2020-11-01 12:30 微风间凉雨 阅读(107) 评论(2) 推荐(0)
摘要: #include<stdio.h> int main() { int answer; char words[5000]; printf("在家上学让一些人欢喜一些人忧.\n"); printf("1. 作为一个宅,社恐,觉得这样很好. 有网络,自主学习,很ok.\n"); printf("2. 不喜 阅读全文
posted @ 2020-10-17 09:25 微风间凉雨 阅读(121) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-10-13 15:33 微风间凉雨 阅读(120) 评论(0) 推荐(0)