摘要: #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 22:10 aaaabbbbccccdddd 阅读(146) 评论(0) 推荐(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 23:43 aaaabbbbccccdddd 阅读(195) 评论(1) 推荐(0)
摘要: // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int binarySearch(int x[], int n, int item); // 函数声明 i 阅读全文
posted @ 2019-12-17 22:44 aaaabbbbccccdddd 阅读(214) 评论(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 22:58 aaaabbbbccccdddd 阅读(256) 评论(0) 推荐(0)
摘要: 恢复内容开始 // 一元二次方程求解 // 重复执行, 直到按Ctrl+D或Ctrl+E结束 // #include <math.h> #include <stdio.h> #include <stdlib.h> int main() { float a, b, c, x1, x2; float d 阅读全文
posted @ 2019-11-20 00:28 aaaabbbbccccdddd 阅读(173) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { int x=1234; float f=123.456; double m=123.456; char ch='a'; char a[]="Hello, world!"; // 定义一个数组a,数组中连续存放了字符串常量hello,wo 阅读全文
posted @ 2019-11-06 07:34 aaaabbbbccccdddd 阅读(134) 评论(2) 推荐(0)
点击右上角即可分享
微信分享提示