91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

由用戶輸入n個10以內的數,每輸入i(0=<i<=9),就把它插入到第i號隊列中。最后把10個隊列中非空隊列,按隊列號從小到大的順序串成一個鏈,并輸出該鏈的所有元素。 數據結構上機作業 第二章14 張憲超

資源截圖

代碼片段和文件信息

//#include?
#include
using?namespace?std;

const?int?MaxSize=10;
const?int?MaxQNode=10;

typedef?struct?node{
????int?data;
????node?*next;
}QNode;

void?Insert(QNode?*QH[]QNode?*QT[]int?x){
????QNode?*s;
????s=new?QNode;
????s->data=x;
????s->next=NULL;
????if(QH[x]==NULL){
????????QH[x]=s;
????????QT[x]=s;
????}
????else{
????????QT[x]->next=s;
????????QT[x]=s;
????}
}

void?Create(QNode?*QH[]QNode*?QT[]){
????int?nxi;
????cout<<“input?n(n<10):?“;
????cin>>n;
????cout<
????for(i=0;i????????do{
????????????cout<<“input?no.“<????????????cin>>x;
????????}while(x<0||x>10);
????????Insert(QHQTx);
????}
}

void?link(QNode?*QH[]QNode*QT[])

評論

共有 條評論