2020年1月1日

实验七

摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> const int N = 10; // 定义结构体类型struct student,并定义其别名为STU typedef struct student { long int id; 阅读全文

posted @ 2020-01-01 09:17 鬼黎 阅读(77) 评论(1) 推荐(0)

2019年12月23日

实验6

摘要: #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-23 12:57 鬼黎 阅读(111) 评论(1) 推荐(0)

2019年12月16日

实验5作业

摘要: 1、 // 练习:使用二分查找,在一组有序元素中查找数据项 // 形参是数组,实参是数组名 #include <stdio.h> #include <stdlib.h> const int N=5; int binarySearch(int x[], int n, int item); // 函数声 阅读全文

posted @ 2019-12-16 21:59 鬼黎 阅读(126) 评论(2) 推荐(0)

2019年12月3日

实验四

摘要: #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 21:49 鬼黎 阅读(108) 评论(3) 推荐(0)

2019年11月16日

实验3作业

摘要: Part 1.1 / 一元二次方程求解 // 重复执行, 直到按Ctrl+D或Ctrl+E结束 // #include <math.h> #include <stdio.h> #include <stdlib.h> int main() { float a, b, c, x1, x2; float 阅读全文

posted @ 2019-11-16 22:54 鬼黎 阅读(144) 评论(1) 推荐(0)

2019年11月3日

实验2作业

摘要: Part1:格式化输出函数prrintf()和格式化输入函数scanf() Part2:验证性内容 ex2-4 实验总结与体会:1、格式化输入输出函数中,注意地址符是否运用 2、理解掌握了if语句 3、经常在{}这个符号上踩坑 阅读全文

posted @ 2019-11-03 15:12 鬼黎 阅读(147) 评论(2) 推荐(0)

2019年10月21日

罗帅的作业

摘要: #include <stdio.h> int main() { int x; printf("输入一个整数: \n"); scanf("%d",&x); if(x%2==1) printf("是奇数"); else printf("是偶数"); return 0; } /* 程序功能: 要求用户从键盘输入1~7之间的整数 如果输入的是1~5, 提示用户是工作日,要努力工作; 如果输入的是6或7,提 阅读全文

posted @ 2019-10-21 10:43 鬼黎 阅读(141) 评论(3) 推荐(0)

导航