c程序设计教程与实验(吉顺如 陶恂)实验9答案

上传人:第*** 文档编号:34055017 上传时间:2018-02-20 格式:DOCX 页数:5 大小:17.50KB
返回 下载 相关 举报
c程序设计教程与实验(吉顺如 陶恂)实验9答案_第1页
第1页 / 共5页
c程序设计教程与实验(吉顺如 陶恂)实验9答案_第2页
第2页 / 共5页
c程序设计教程与实验(吉顺如 陶恂)实验9答案_第3页
第3页 / 共5页
c程序设计教程与实验(吉顺如 陶恂)实验9答案_第4页
第4页 / 共5页
c程序设计教程与实验(吉顺如 陶恂)实验9答案_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

《c程序设计教程与实验(吉顺如 陶恂)实验9答案》由会员分享,可在线阅读,更多相关《c程序设计教程与实验(吉顺如 陶恂)实验9答案(5页珍藏版)》请在金锄头文库上搜索。

1、Sy9-1#includestruct stud char name20;int age; ;struct stud fun(struct stud person,int n) int min,i;min=0;for(i=0;i#include #define NUM 4struct student int rank; /* 学生排名 */char name4; /* 学生姓名 */float score; /* 学生成绩 */stu= 3,Tom,89.3,4,Mary,78.2,1,Jack,95.1, 2,Jim,90.6 ;main() char str10;int i;do prin

2、tf(Entre a name:);scanf(%s,str);for(i=0;i=NUM) printf(Not foundn); while(strcmp(str,0)!=0);Sy9-4#include #define N 4struct student int score; /* 学生成绩 */char name10; /* 学生姓名 */ sN;void main()int i, score90, score80, score70, score60, score_failed;for(i=0; istatic struct person char name20;int age; pe

3、rson=li-ming,18,wang-hua,19,zhang-ping,20 ;main() int i,max,min; max=min=person0.age;for(i=1;imax) max=personi.age;else if(personi.agestruct nodechar data;struct node *link;*head;ins(struct node *q) if(head=NULL) q-link=NULL;head=q;else q-link=head;head=q;main() char ch;struct node *p;head=NULL;whil

4、e(ch=getchar()!=n) p=(struct node*) malloc(sizeof(struct node);p-data=ch;ins(p);p=head;while(p!=NULL) printf(%c,p-data);p=p-link;Sy9-7#includestruct students char num10;char name10;float math,eng,c,sum;st5;main() int i,j,k;float max,min;for(i=0;imax) max=sti.sum;k=i;if(sti.sumstruct students char num10;char name10;float math,eng,c,sum;st5;main() int i,j,k;float max,min;for(i=0;imax) max=sti.sum;k=i;if(sti.summin) min=sti.sum;j=i;printf(%s,%sn,stk.num,stk.name);printf(%.2f,%.2f,%.2fn,stk.math,stk.eng,stk.c);printf(%s,%sn,stj.num,stj.name);printf(%.2f,%.2f, %.2fn,stj.math,stj.eng,stj.c);

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 解决方案

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号