freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

[工學(xué)]鏈表綜合學(xué)習(xí)-閱讀頁

2024-09-09 14:22本頁面
  

【正文】 next。amp。previous=current。}if(previous!=head){ x=previousdata。}else{ cout第i個元素?zé)o前驅(qū),不能讀取!endl。}}templateclass datatypebool LISTdatatype::replace_data(int i,const datatype x){ NODEdatatype *current=head。if((i1)||(ilength())){ cout非法位置修改元素,不能修改!endl。}current=headnext。amp。current=currentnext。return true。int j=1。return false。if(newnode==NULL){ cout內(nèi)存無空間!不能插入!endl。}newnodedata=data。previous=head。while(current!=NULLamp。ji){ previous=current。j++。newnodenext=current。return true。int j=1。return false。if((ilength()+1)||(i0)){ cout刪除位置不正確!不能刪除!endl。}previous=head。while(current!=NULLamp。ji){ previous=current。j++。previousnext=currentnext。return true。result){ NODEdatatype *current。while(current!=NULL){ if(currentdata!=x)current=current。return true。return false。current=headnext。while(current){ coutcurrentdata 。}coutendl。LISTint list1。i=5。()。()。()。()。()。(0,i_data)。(4,i_data)。LISTfloat list2。i=5。()。for(i=0。i++){ if((i,f_data))coutf_data 。for(i=0。i++){ if((i,f_data))coutf_data 。}oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooincludeincludedefine LEN sizeof(struct listnode)struct listnode { int num。 float score。}。 int n=0。 cout輸入學(xué)號、姓名、成績(學(xué)號為零停止):endl。 head=NULL。 if(n==1) head=p1。 p2=p1。 cinp1nump1namep1score。 return (head)。 pa2=pa1=ah。 do { while((pb1score)(pa1score)amp。(pa1next!=NULL)) { pa2=pa1。 } if(pb1score=pa1score) { if(ah==pa1) ah=pb1。 pb1=pb1next。 pa2=pb2。 } }while((pa1next!=NULL)||(pa1==NULLamp。pb1!=NULL))。amp。amp。 return (ah)。 struct listnode h, t。 =head。h。 } p=pnext=amp。 while (p!=) { p3=amp。 p1=p3next。 while (p2!=p) { if ((p1score)(p2score)) { p1next=p2next。 p3next=p2。 p2=p1next。 p1=p2。 } } p=p1。t) { p=pnext。 return 。 p1=head。 return(head)。amp。 p1=p1next。 coutp1num\tp1name\tp1scoreendl。 } else { cout無此學(xué)生!endl。 } }}void print(struct listnode *head){ struct listnode *p。 p=head。 p=pnext。}int main(){ struct listnode *ahead,*bhead,*abh,*fhead。 cout輸入鏈表一:endl。 cout鏈表一為endl。 print(ahead)。 bhead=creat()。 bhead=sort(bhead)。 abh=insert(ahead,bhead)。 print(abh)。 cinx。 retu
點擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1