摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int id; 阅读全文
posted @ 2019-12-31 15:40 不明 阅读(120) 评论(1) 推荐(0)
摘要: #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-24 22:40 不明 阅读(106) 评论(1) 推荐(1)
摘要: // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int binarySearch(int x[], int n, int item); // 函数声明 i 阅读全文
posted @ 2019-12-17 23:20 不明 阅读(108) 评论(1) 推荐(0)
摘要: part2-1//寻找两个整数之间的所有素数(包括这两个整数),把结果保存在数组bb中,函数返回素数的个数。 // 例如,输入6和21,则输出为:7 11 13 17 19。 #include <stdio.h> #include <stdlib.h> #define N 1000 int fun( 阅读全文
posted @ 2019-12-01 22:36 不明 阅读(74) 评论(0) 推荐(0)
摘要: part2#include <stdio.h> #include <stdlib.h> int main() { int number, max, min, n; n=1; printf("输入第%d个数: ", n); scanf("%d", &number); max = number; min 阅读全文
posted @ 2019-11-18 23:55 不明 阅读(81) 评论(1) 推荐(0)
摘要: 恢复内容开始 #include<stdio.h> #include<stdlio.h>int main() { int choice; printf("输入0~9以内的数字,选择屏幕背景色前景色方案: \n"); printf("1-\t黑底绿色\n"); printf("2-\t白底黑色\n"); 阅读全文
posted @ 2019-11-04 23:13 不明 阅读(121) 评论(1) 推荐(0)
摘要: #include<stdio.h> int main(){ int days; printf("please input:\n"); scanf("%d",&days); if(days>=1&&days<=5) printf("workdays,fighting\n"); else if(days 阅读全文
posted @ 2019-10-18 17:17 不明 阅读(136) 评论(0) 推荐(0)