全文预览

C语言程序设计题型

上传者:qnrdwb |  格式:pdf  |  页数:65 |  大小:6276KB

文档介绍
[i], fp);\rutchar(c[i]);\rclose(fp);.\rc%100d\ref(gh?ij?k?ijg3 mnop?qrstuvwx(yzij{?|}?~mnop)?€\r‚op?ƒ„gwx…€‚&w 0†‡s?"stud"#\r.%&'(\r%)*+(\rinclude "stdio.h9\rtract student\rchar num[6];\rhar name[8];\rnt score[3];\rloat avr;\rstu[5];\riain()\rint i, j, sum;\rILE *fp;\r*input*/\ror (i=0;i<5;i++)\rprintf (zz\n please input No. %d score:\n?z, i);\rrintf (?zstuNo:?z);\rcanf(9%s9?stu[i]. num);\rrintf("name:9)V\rcanf(9s”, stu[i]. name);\rum=0;\ror(j=0;j<3;j++)\rprintf (""score %d, P,j+1);\rcanf (9%d9, &stu[i]. score[j]);\rum+=stu[i]. score[j];\rtu[i]. avr=sum/3. 0;\rp=fopen(9stud9,9w9);\ror(i=0;i<5;i++)\rf(fwrite(&stu[i], sizeof (struct student), 1, fp)!=1)\rrintf (?zfile write error\n?z);\rclose (fp);\r‘C’“”•

收藏

分享

举报
下载此文档