資源描述:
《實(shí)驗(yàn)7查找算法的實(shí)現(xiàn)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫。
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("創(chuàng)建的順表內(nèi)容:");for(i=0;ilength;i++)printf("list.elem[%d].key=%d",i+1,list->elem[i].key);printf("輸入查找關(guān)鍵字:");scanf("%d",&key);seq_search(list,key);}voidcreate_seq(SStable*list){inti;printf("請輸入順序表的內(nèi)容:")
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