2019年12月29日
摘要: part1:正确 文本文件可以看,二进制文件看不懂。 part2: #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typ 阅读全文
posted @ 2019-12-29 08:53 钱之豪 阅读(104) 评论(1) 推荐(0)
  2019年12月22日
摘要: #include <stdio.h> #include <stdlib.h> const int N=5; // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score; 阅读全文
posted @ 2019-12-22 21:58 钱之豪 阅读(156) 评论(2) 推荐(0)
  2019年12月17日
摘要: Part1:ABCDEFG // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int binarySearch(int x[], int n, int it 阅读全文
posted @ 2019-12-17 09:33 钱之豪 阅读(115) 评论(1) 推荐(0)
  2019年12月1日
摘要: //寻找两个整数之间的所有素数(包括这两个整数),把结果保存在数组bb中,函数返回素数的个数。 // 例如,输入6和21,则输出为:7 11 13 17 19。 #include <stdio.h> #include <stdlib.h> #define N 1000 int fun(int n,i 阅读全文
posted @ 2019-12-01 14:22 钱之豪 阅读(149) 评论(3) 推荐(0)
  2019年11月18日
摘要: #include <stdio.h> #include <stdlib.h> int main() { int number, max, min, n; n=1; printf("输入第%d个数: ", n); scanf("%d", &number); max = number; min = nu 阅读全文
posted @ 2019-11-18 10:51 钱之豪 阅读(131) 评论(1) 推荐(0)
  2019年11月3日
摘要: #include #include int main() { int choice; // 显示菜单 printf("输入0~9以内的数字,选择屏幕背景色前景色方案: \n"); printf("1-\t黑底绿色\n"); printf("2-\t白底黑色\n"); printf("3-\t蓝底白色\n"); printf... 阅读全文
posted @ 2019-11-03 23:08 钱之豪 阅读(103) 评论(1) 推荐(0)
  2019年10月19日
摘要: #include int main() { int x; printf("输入一个整数: \n"); scanf("%d",&x); // 在×××处填写相应表达式 // 使得当表达式成立时,判定x是奇数,否则是偶数 if( x%2==1) printf("是... 阅读全文
posted @ 2019-10-19 22:45 钱之豪 阅读(124) 评论(0) 推荐(0)