12 2019 档案

摘要:#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 12:53 辞赋 阅读(92) 评论(3) 推荐(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 12:58 辞赋 阅读(83) 评论(2) 推荐(0)
摘要:// 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include<stdio.h> #include <stdlib.h>const int N=5; int binarySearch(int x[], int n, int item); // 函数声明 int 阅读全文
posted @ 2019-12-17 21:57 辞赋 阅读(95) 评论(3) 推荐(0)
摘要:#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; for(i=2;i<j;i++) 阅读全文
posted @ 2019-12-03 22:28 辞赋 阅读(108) 评论(4) 推荐(0)