全文预览

复件C语言编程经典100例

上传者:梦溪 |  格式:pdf  |  页数:91 |  大小:4596KB

文档介绍
>,w");\rfor(i=0;i<n;i++)\r{putc(c[i],fp);\rputchar(c[i]);\r}\rfclose(fp);\r!100]\r"#?V?WXpY?WX?3Z[9/\p$% :]^_`aWXbpcdpeZ[/\f,\rgh3\rij/\pkl?9]^Agh39ij]8Cm?45“stud”I\r1.\r2.\r#includc"stdio.h"\rstructstudent\r{charnum®\rcharname[8];\rintscore[3];\rfloatavr;\r}stu[5];\rmain()EvaluationWarning:ThedocumentwascreatedwithSpire.PDFfor.NET.\r{inti,j,sum;\rFILE*fp;\r/*input*/\rfor(i=0;i<5;i++)\r{printf("\npleaseinputNo.%dscore:\n",i);\rprintf("stuNo:");\rscanf(H%sH,stu[i].num);\rprintf(uname:");\rscanf(,"%s",stu[i].name);\rsum=0;\rfor(j=0;j<3;j++)\r{printfC^core%d.n,j+l);\rscanf("%d",&stu[i].score[j]);\rsum+=stu[i].score[j];\r)\rstu[i].avr=sum/3.0;\r)\rfpfopen(“stud",“w")>\rfor(i=0;i<5;i++)\rif(fwrile(&stu[i],sizeof(structstudent),l,fp)!=l)\rprintf(nfilewriteerror\n");\rfclose(fp);

收藏

分享

举报
下载此文档