摘要: #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-26 15:55 车木 阅读(134) 评论(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-18 21:38 车木 阅读(142) 评论(1) 推荐(0)
摘要: // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int binarySearch(int x[], int n, int item); // 函数声明 i 阅读全文
posted @ 2019-12-15 11:59 车木 阅读(165) 评论(1) 推荐(0)
摘要: #include <math.h> #include <stdio.h> #include <stdlib.h> // 函数声明 void solve(double a, double b, double c); // 主函数 int main() { double a, b, c; printf( 阅读全文
posted @ 2019-12-03 19:23 车木 阅读(118) 评论(0) 推荐(0)
摘要: // 一元二次方程求解 // 重复执行, 直到按Ctrl+D或Ctrl+E结束 // #include <math.h> #include <stdio.h> #include <stdlib.h> int main() { float a, b, c, x1, x2; float delta, r 阅读全文
posted @ 2019-11-16 17:24 车木 阅读(136) 评论(2) 推荐(0)
摘要: ` 阅读全文
posted @ 2019-11-03 15:01 车木 阅读(109) 评论(2) 推荐(0)
摘要: # include int main() { char ch; printf("输入一个字符:\n"); scanf("%c",&ch); if(ch>='a'&&ch int main() { int days; printf("输入一个整数: \n"); scanf("%d",&days); if(days>=1&&days int main() { int a=5,b=8,c... 阅读全文
posted @ 2019-10-20 22:50 车木 阅读(193) 评论(0) 推荐(0)