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

正文內(nèi)容

停車場管理系統(tǒng)及課程設(shè)計報告(文件)

2025-09-21 20:08 上一頁面

下一頁面
 

【正文】 q=Waitfrontnext。 printf( Car number is: )。 } } else printf(\nNo car in the road.)。 int Departure(SqStackCar *In,SqStackCar *temp,LinkQueueCar *Wait)。 void interpret(char cmd)。 InitStack(amp。 InitQueue(amp。 while(1) { initialization()。a39。 break。part,amp。d39。road)。: Departure(amp。 break。part,amp。 case 39。temp,amp。e39。 break。getch()。 break。 for(i=1。 printf(THIS IS A CAR PART MANAGE SYSYTEM!)。 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計 .停車場管理系統(tǒng) 第 35 頁 共 97 頁 printf(NUM: 202020020205.)。 printf(CLASS: INTERNET02)。 printf(\n********************************************************************************)。 cmd = getche()。)amp。)amp。)amp。)amp。)amp。)amp。)amp。))。// 此全局變量用來計數(shù)堆?,F(xiàn)有的車數(shù) int CountForQueue=0。// 用來記錄離開時間,默認為 1,說明還沒有離開 int License。//棧頂指針,如果指向 0,說明棧為空 int stacksize。//用來記錄到達時間,默認為 1,說明還沒有到達 int LeaveTime。 typedef struct// 隊列的定義 { QNode *front。S)//此函數(shù)用來初始化棧 { =(CarNode *)malloc(MAX_SIZE*sizeof(CarNode))。 =MAX_SIZE。 if(! ) { cout內(nèi)存分配失?。?endl。//下一個節(jié)點指空 return true。 if(!p) { cout內(nèi)存分配失?。?endl。 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計 .停車場管理系統(tǒng) 第 39 頁 共 97 頁 pLeaveTime = 。 =p。t)//此函數(shù)用來出隊 { if( == ) { cout隊列為空! endl。 =pCondition 。 if( ==p)//如果 P 是指向最后一個出隊的元素 = 。C,char condition,int arrivetime,int leavetime,int license)//本函數(shù)用來初始化一個 CarNode 節(jié)點 { =arrivetime。} bool Push(CarStack amp。} (* ).ArriveTime = 。 ++ 。t)//此函數(shù)用來彈出棧內(nèi)元素 { if( == ) { cout???,不能執(zhí)行出棧操作! endl。 =(* ).Condition 。} bool IsStackFull(CarStack amp。S)//此函數(shù)用來判斷堆棧是否為空 { if( == ) return true。 else return false。 while(p!= ) 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計 .停車場管理系統(tǒng) 第 42 頁 共 97 頁 { if((*p).License ==a) tag=true。} bool SearchInQueue(Queue amp。 }//退出此 while 循環(huán)時 p 指向最后一個元素 if((*p).License ==a) tag=true。Q,int a1,int a2)//此函數(shù)用來表示進入車輛 , 參數(shù) a1 用來表示到達時間,參數(shù) a2 表示車牌號碼 { if(SearchInStack(S,a2)) { cout車號 a2已經(jīng)存在于停車場內(nèi),輸入有誤endl。 } if(IsStackFull(S))//如果堆棧已滿,說明停車場已滿,需要停車在通道 { QNode qnode。 =1。 cout 車號: 停在通道的第CountForQueue號位置 endl。A39。 ++CountForStack。Q,int a1,int a2)//此函數(shù)用來出車,參數(shù) a1 用來表示離開時間,參數(shù) a2 表示車牌號碼 { if(SearchInQueue(Q,a2)) { cout車號 a2存在于通道內(nèi),還未進入停車場,不能離開 endl。 } CarStack tempstack。 bool tag2=true。//用來標志是否是離開時間小于到達時間而導致離開失敗, true 表示離開失敗 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計 .停車場管理系統(tǒng) 第 45 頁 共 97 頁 while(1)//讓車離開 { Pop(S,temp)。} else cout 車號 a2 現(xiàn) 在離 開停 車場 ,所 用的 時間 為 收費為( )*FAREendl。 Push(S,temp)。tag2==falseamp。 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計 .停車場管理系統(tǒng) 第 46 頁 共 97 頁 =a1 。 Push(S,temp)。 } void showmenu(CarStack amp。 cout 2: 離開 endl。 cintag。amp。 switch(tag) { case 1: cout請輸入到達的車號 endl。 InCar(S,Q,a2,a1)。 cout請輸入離開的時間 endl。 case 3: return 。 cinch。amp。 } int main() { CarStack carstack。//建立并且初始化用于通道的隊列 showmenu(carstack,carqueue)。// 建立并且初始化用于停車場的堆棧 Queue carqueue。e39。E39。 } char ch。 OutCar(S,Q,a2,a1)。 case 2: cout請輸入離開的車號 endl。 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計 .停車場管理系統(tǒng) 第 47 頁 共 97 頁 cout請輸入到達時間 endl。 int a1。amp。 cout***************************** 請 按 鍵 選 擇******************************endl。Q) { cout****************************** 選擇菜單*******************************endl。amp。 = 。tag3==false) { DeQueue(Q,tempqnode)。//用來暫時保存從通道出來的汽車 if(tag1==trueamp。 } else Push(tempstack ,temp)。 tag3=true。 CarNode temp。//建立并且初始化用于暫存出車時讓車的堆棧 bool tag1=false。} if(!SearchInStack(S,a2)) { cout車號 a2不在停車場內(nèi),輸入有誤 endl。} } void OutCar(CarStack amp。 =a2。 =a1。 EnQueue(Q,qnode)。//在通道時間不收費,所以不計時 =39。 } if(SearchInQueue(Q,a2)) 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計 .停車場管理系統(tǒng) 第 43 頁 共 97 頁 { cout車號 a2已經(jīng)存在于通道內(nèi),輸入有誤 endl。} void InCar(CarStack amp。 if(!IsQueueEmputy(Q))//如果隊列非空 { QNode *p=next 。} if((*p).License ==a) tag=true。S,int a) { bool tag=false。} bool IsQueueEmputy(Queue amp。 else return false。 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計 .停車場管理系統(tǒng) 第 41 頁 共 97 頁 =(* ).License 。} 。} bool Pop(CarStack amp。 (* ).LeaveTime = 。car)//此函數(shù)用來入棧一個CarNode 節(jié)點 { if( = ) { cout此棧已滿,不能壓入新的信息 endl。 =leavetime。 return true。 =pLicense 。} QNode *p=next 。} bool DeQueue(Queue amp。 pnext =0。} pArriveTime = 。Q,QNode amp。} = 。} bool InitQueue(Queue amp。 return false。//隊尾指針 }Queue。// 記錄車牌號 QNode *next。 typedef struct QNode//隊列節(jié)點的定義 { char Condition 。 typedef struct //棧的定義 { CarNode *base。//用來表示“到達”或者“離開”的狀態(tài) , 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計 .停車場管理系統(tǒng) 第 37 頁 共 97 頁 int ArriveTime。 } 二 includeiostream includefstream using namespace std。(cmd!=39。(cmd!=39。(cmd!=39。(cmd!=39。(cmd!=39。(cmd!=39。(cmd!=39。 }while((cmd!=39。 } char readmand() /*選擇函數(shù) */ { char cmd。 printf(\n********************************************************************************)。 printf(GRADE: 2020.)。 printf(NAME: GAOHE.)。i++) printf(\1)。 clrscr()。 break。E39。getch()。 break。: Print(amp。road)。p39。temp,amp。 case 39。part,amp。 break。A39。part,amp。 /*讀取停車場狀況 */ clrscr()。 printf(Press any key to continue......)。 InitStack(amp。 SqStackCar part,temp。 void initialization()。 getch()。 q=qnext。 printf(The )。) /*打印便道 */ { printf(The car in the road!\n)。 } printf(Press any key to continue...)。 printf( car number is: )。 Push(Temp,t)。239。c!=39。c!=39。 }while(c!=39。 printf(3. return.)。 printf(1. Print the road!)。c!=39。 p=(CarNode *)malloc(sizeof(CarNode))。 int count=1。 數(shù)據(jù)結(jié)構(gòu)課程設(shè)計 .停車場管理系統(tǒng) 第 29 頁 共 97 頁 if(q==Waitrear) Waitrear=Waitfront。 scanf(%d:%d,amp。 printf(\nThe )。Waitfront!=Waitrear) /*車站中有空位,便道有車,車入站 */ { q=(QueueNode *)malloc(sizeof(QueueNode))。 Push(In,p)。 } else Push(temp,t)。 flag=1。 money = ((a1a2+24)%24*60+(b1b2+60)%60)*price。
點擊復制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1