- 3
- 0
- 约 8页
- 2016-12-25 发布于贵州
- 举报
《精通C程序设计教程》第十、十一章部分习题答案
第十章
10.2 read=0, green=1, yellow=5, white=6, black=7
10.6 42, 1
10.8
#include stdio.h
typedef struct student { long xh;char xm[21];int s1,s2,s3; } STU;
#define N 5
void inp_stu(STU a[N])
{ int i;
printf(Input %d students data\n,N);
printf(xh xm s1 s2 s3\n);
for(i=0;iN;i++) scanf(%ld%s%d%d%d,a[i].xh,a[i].xm,a[i].s1,a[i].s2,a[i].s3);
}
void out_stu(STU a[N],int p[N])
{ int i;
for(i=0;iN;i++) printf(%ld %s %d %d %d\n, \
a[p[i]].xh,a[p[i]].xm,a[p[i]].s1,a[p[i]].s2,a[p[i]].s3);
}
#define SUM(a,i) (a[i].s1+a[i].s2+a[i].s3)
void Sort(STU a[N],int p[N]) /* 索引冒泡排序 */
{
您可能关注的文档
最近下载
- yokogawa横河EJA110E高性能差压变送器产品选型技术资料.pdf
- 2025年贵州普通高中会考生物试卷及答案 .pdf VIP
- 2025年人教版道法八年级上册《第一单元走进社会生活》大单元整体教学设计(2022课标).docx
- 2019译林版高中英语选择性必修一Unit4 Exploring poetry 知识清单(学生版).docx VIP
- 《GB_T 10067.46-2014电热装置基本技术条件 第46部分:罩式电阻炉》专题研究报告.pptx VIP
- 质检报告模板.docx VIP
- 2019译林版高中英语选择性必修四Unit3 Careers and skills 知识清单(学生版).docx VIP
- 水平定向钻法管道穿越工程技术规程CECS 382-2014.docx VIP
- 军人党员发展流程.pptx VIP
- 7.1 小小鞋店 课件 北师大版(2024)数学三年级下册.pptx VIP
原创力文档

文档评论(0)