欢迎来到天天文库
浏览记录
ID:30759784
大小:95.50 KB
页数:24页
时间:2019-01-03
《2016广工anyview试题答案第九章》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、2016riAnyview试题答案第九章Thestructureofthestructureisdefinedasfollows:Struetdate{intyear;Intthemonth;Intday;};//definedatestructuretypesStructstudent{charname[20];Structdatebirth;//birthdate};Thestructurearraysstoresthenameanddateofbirthfornpeople.Solet'swriteaf
2、unction.We'regoingtogettheoldestofthenpeopleistheyoungest.ThenameofthepersonwhoStuclents(students),intnIntj,k=0;For(j=1;j〈nminus1;j++){if[[k].birth.Elseif(s).birth・{if[[k]・birth・month・_k].birth・_[k]・birth・day.}}Returns[k]・Name;}Thestructureofthestructureisd
3、efinedasfollows:Structdate{intyear;Intthemonth;Intday;};//definedatestructuretypesStructstudent{charid,[10];//studentidCharname[20].//nameStructdatebirth;//birthdate};Thestructurearraysstoresthenumber,name,anddateofbirthofnindividuals・Writeafunction,inthefo
4、rmofastructureReturntheinformationoftheoldest(theyoungest)personofthenperson.Structstudent:structstudent:Intj,k=0;For(j=1;j5、sfollows:Structstudent{charid,[10];//studentidCharname[10]・//nameIntscore[5];//gradesinallsubjects};ThestructurearraysstorestheNumbers,names,andgradesofnstudents・writeThefunctionreturnsthenumberofthehighestnumberofstudentsinthisclass・Achar*best(structstuden6、t,intn,intI){Intt=s[0].score[I].For(intj二0;j7、resthestudents'Numbets,names,andtheirfivecoursegrades・writeFunctionreturnsthenumberofthehighestscoresinfiveofthesenindividuals・Student:achar*best.{Intsumis0,k,t=0;For(int1=0;It){t二sum;Sum=0;K=I;}Theelsesu8、m二0;}Returns[k]・Id;}Thestructureofthedateandlinkedlistnodesisdefinedasfollows:Structdate{intyear;Intthemonth;Intday;};//datestructuretypeStructureofstructstudentNode//linkedlistnodes{charname[10];//nam
5、sfollows:Structstudent{charid,[10];//studentidCharname[10]・//nameIntscore[5];//gradesinallsubjects};ThestructurearraysstorestheNumbers,names,andgradesofnstudents・writeThefunctionreturnsthenumberofthehighestnumberofstudentsinthisclass・Achar*best(structstuden
6、t,intn,intI){Intt=s[0].score[I].For(intj二0;j7、resthestudents'Numbets,names,andtheirfivecoursegrades・writeFunctionreturnsthenumberofthehighestscoresinfiveofthesenindividuals・Student:achar*best.{Intsumis0,k,t=0;For(int1=0;It){t二sum;Sum=0;K=I;}Theelsesu8、m二0;}Returns[k]・Id;}Thestructureofthedateandlinkedlistnodesisdefinedasfollows:Structdate{intyear;Intthemonth;Intday;};//datestructuretypeStructureofstructstudentNode//linkedlistnodes{charname[10];//nam
7、resthestudents'Numbets,names,andtheirfivecoursegrades・writeFunctionreturnsthenumberofthehighestscoresinfiveofthesenindividuals・Student:achar*best.{Intsumis0,k,t=0;For(int1=0;It){t二sum;Sum=0;K=I;}Theelsesu
8、m二0;}Returns[k]・Id;}Thestructureofthedateandlinkedlistnodesisdefinedasfollows:Structdate{intyear;Intthemonth;Intday;};//datestructuretypeStructureofstructstudentNode//linkedlistnodes{charname[10];//nam
此文档下载收益归作者所有