摘要: 1.从文本文件file1.dat中读取数据,找出最高分和最低分学生信息,并输出在屏幕上(修改29行后) // 从文本文件file1.dat中读取数据,找出最高分和最低分学生信息,并输出在屏幕上 #include <stdio.h> #include <stdlib.h> #define N 10 / 阅读全文
posted @ 2020-01-01 11:44 突突拜拜 阅读(152) 评论(1) 推荐(0)
摘要: Part1 1.数组stu中查找低查找成绩与低分相同的学生将其信息保存在数组t中 #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct stud 阅读全文
posted @ 2019-12-24 16:58 突突拜拜 阅读(141) 评论(1) 推荐(0)
摘要: 一.二分查找算法练习1(形参是数组) // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int binarySearch(int x[], int n, i 阅读全文
posted @ 2019-12-17 16:40 突突拜拜 阅读(133) 评论(3) 推荐(0)
摘要: 实验1.求两个之间的所有素数 #include <stdio.h> #include <stdlib.h> #define N 1000 int fun(int n,int m,int bb[N]) { int i,j,k=0,flag; for(j=n;j<=m;j++) { flag=1; fo 阅读全文
posted @ 2019-12-02 23:31 突突拜拜 阅读(124) 评论(1) 推荐(0)
摘要: 实验一 补足程序 #include<stdio.h> int main(){ int number,max,min,n; n=1; printf("输入第%d个数字",n); scanf("%d",&number); max=number; min=number; while(n<=4){ n++; 阅读全文
posted @ 2019-11-19 22:15 突突拜拜 阅读(173) 评论(1) 推荐(0)
摘要: part1.格式化输入函数scanf()和格式化输出printf() 实验一 #include<stdio.h> int main() { int x=2345; float f=123.456; double m=123.456; char ch ='a'; char a[]="hellow,wo 阅读全文
posted @ 2019-11-05 22:47 突突拜拜 阅读(187) 评论(2) 推荐(0)
摘要: exe.1 exe.2 exe.3 exe4. 阅读全文
posted @ 2019-10-22 09:21 突突拜拜 阅读(93) 评论(0) 推荐(0)