资源描述:
《实验7查找算法的实现》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、(一)顺序查找#include#defineMAX100typedefintkeytype;typedefstruct{keytypekey;}elemtype;typedefstruct{elemtypeelem[MAX+1];intlength;}SStable;voidcreate_seq(SStable*list);intseq_search(SStable*list,keytypek);voidmain(){SStable*list,table;keytypekey;inti;list=&table;printf(
2、"请输入顺序表的长度:");scanf("%d",&list->length);create_seq(list);printf("创建的顺表内容:");for(i=0;ilength;i++)printf("list.elem[%d].key=%d",i+1,list->elem[i].key);printf("输入查找关键字:");scanf("%d",&key);seq_search(list,key);}voidcreate_seq(SStable*list){inti;printf("请输入顺序表的内容:")
3、;for(i=0;ilength;i++){printf("list.elem[%d].key=",i+1);scanf("%d",&list->elem[i].key);}}intseq_search(SStable*list,keytypek){inti=0,flag=0;meetthestandardrequirements.Postweldheattreatmentofpipesafterheattreatment,hardnesstestsshouldbeconducted,hardnesstestsamplingof
4、notlessthan10%,hardness120%,15CrMohardnessofcarbonsteelpipeshallbelessthanbasemetalsteelafterheattreatment,hardnessshouldnotbegreaterthantheparentmaterialof125%.Rateofpipelinenondestructivetestingshallbecarriedoutaccordingtothedesignrequirements,nonodesignrequirementstheSH3
5、501-2002table10"percentageofradiographicexaminationofweldedjointsandacceptablelevel",andfixednumbernotlessthanthetotalnumberof40%weldinspection.Thisprojecthasawallthicknessof32mm20#steelhighpressuretube,x-rayscannotpenetrate,thesituationmaynotallownon-destructivetestingbyγ-
6、ray,usedweldbackingandtwo-layerweldsbeforefilledbyxraydetectionmethod,theotherlayerbyultrasonicdetectormethod.Shouldbeconsistentwithexistingnationalstandardsforradiographictestingofthe...Gastankusedchainforthisprojectpromotedtheupsidedownconstruction.Chainreversalinstallati
7、onmethodshowninthefollowingfigure:weldersWeldersandweldingmethodstoparticipateinthisprojectshouldbeinaccordancewiththeMinistryofpersonnelissuedbytheboilersandpressurevesselswelderexaminationrulesforqualificationexamination,afterpassingthequalificationcertificateofweldingwor
8、k.Tankweldingmanualarcwelding,automaticwelding.Manualarcweldingcompanyhasanumberof