函数
邹氏情歌cium
这个作者很懒,什么都没留下…
展开
-
11.3编写一个函数Print,打印一个学生的成绩数组,该数组中有5个学生的数据记录,用主函数输入这些记录,用Print函数输出这些记录。
11.3编写一个函数Print,打印一个学生的成绩数组,该数组中有5个学生的数据记录,用主函数输入这些记录,用Print函数输出这些记录。 #include <stdio.h> void print(struct student s[]); struct student { int num; char name[10]; float score[3]; } stu[5]; int...原创 2019-08-06 18:47:26 · 6071 阅读 · 1 评论 -
10.13 写一个用矩形法求定积分的通用函数,分别求∫_0^1▒sinxdx 、∫_0^1▒cosxdx、∫_0^1▒〖e^x dx〗的值。
10.13 写一个用矩形法求定积分的通用函数,分别求∫_0^1▒sinxdx 、∫_01▒cosxdx、∫_01▒〖e^x dx〗的值。 #include<stdio.h> #include<math.h> double Integral(double a, double b, double(*pfn)(double)) { double step = 1e-5; do...原创 2019-08-07 15:25:38 · 2102 阅读 · 1 评论 -
编写一个函数,实现单链表逆序。
编写一个函数,实现单链表逆序。 typedef struct _NODE { int value; struct _NODE * next; }NODE, *PNODE; void Reverse(PNODE * ppHead) { if (!(NULL == *ppHead || NULL == (*ppHead)->next)) { PNODE p1, p2, p3; ...原创 2019-08-14 17:57:52 · 1542 阅读 · 0 评论 -
编写一个函数print,打印一个学生的成绩数组,该数组中有5个学生的数据记录,每个记录包括num、name、score[3],用主函数输入这些记录,用print函数输出这些记录。
编写一个函数print,打印一个学生的成绩数组,该数组中有5个学生的数据记录,每个记录包括num、name、score[3],用主函数输入这些记录,用print函数输出这些记录。 #include <stdio.h> void print(struct student s[]); struct student { int num; char name[10]; float sco...原创 2019-08-16 15:00:43 · 1930 阅读 · 0 评论