2019年12月28日

实验7

摘要: #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-28 12:56 19级电信徐哲 阅读(130) 评论(2) 推荐(0) 编辑

2019年12月21日

实验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-21 12:12 19级电信徐哲 阅读(136) 评论(1) 推荐(0) 编辑

2019年12月15日

实验5

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

posted @ 2019-12-15 21:59 19级电信徐哲 阅读(117) 评论(2) 推荐(0) 编辑

2019年12月1日

实验4

摘要: //寻找两个整数之间的所有素数(包括这两个整数),把结果保存在数组bb中,函数返回素数的个数。 // 例如,输入6和21,则输出为:7 11 13 17 19。 #include <stdio.h> #include <stdlib.h> #define N 1000 int fun(int n,i 阅读全文

posted @ 2019-12-01 21:52 19级电信徐哲 阅读(158) 评论(2) 推荐(0) 编辑

2019年11月17日

实验3

摘要: /* 编程找出5个整数的最大数和最小数 《C语言程序设计教程学习指导》p122实验内容(3) */ #include <stdio.h> #include <stdlib.h> int main() { int number, max, min, n; n=1; printf("输入第%d个数: " 阅读全文

posted @ 2019-11-17 21:56 19级电信徐哲 阅读(138) 评论(2) 推荐(0) 编辑

2019年11月3日

实验2

摘要: 实验总结与体会: scanf中,若输入double型,要用%lf scanf()的格式字符串中最好不要加入不必要的字符 if语句和switch语句差不多明白了一些东西; 使用if语句嵌套时,总是容易因{}的位置问题而出错; 输入法的切换很烦,害得我总是打错一些关键字。 阅读全文

posted @ 2019-11-03 15:17 19级电信徐哲 阅读(199) 评论(3) 推荐(0) 编辑

2019年10月18日

实验1

摘要: #include<stdio.h> int main() { printf("201983270559"); return 0;} #include<stdio.h> int main() { printf("I want to say hello to Mars"); return 0; } #include<stdio.h> int product(int,int); int main(voi 阅读全文

posted @ 2019-10-18 22:18 19级电信徐哲 阅读(160) 评论(0) 推荐(0) 编辑

导航