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

正文內(nèi)容

停車場(chǎng)管理系統(tǒng)及課程設(shè)計(jì)報(bào)告(文件)

 

【正文】 count++。 } }}/***************************主程序***********************************************/int Arrive(SqStackCar *In,LinkQueueCar *Wait)。char readmand()。 LinkQueueCar road。temp)。 getch()。 switch(cmd) { case 39。road)。: Arrive(amp。 case 39。temp,amp。D39。road)。: Print(amp。 break。part,amp。 case 39。exit(0)。: printf(Press any to continue...)。 default : printf(ERROR!)。 gotoxy(0,0)。 gotoxy(15,8)。 gotoxy(15,13)。 gotoxy(15,15)。 printf(1. Car ArriveA 2. Car DepartureD 3. Print CarP )。 do{ printf(Input your choice:)。a39。A39。d39。D39。p39。P39。E39。e39。define MAX_SIZE 2//停車場(chǎng)能夠容納的車的數(shù)量define FARE 5//表示停車場(chǎng)的收費(fèi)為每小時(shí)FARE元int CountForStack=0。//用來(lái)記錄到達(dá)時(shí)間,默認(rèn)為1,說(shuō)明還沒有到達(dá)int LeaveTime。//棧底指針,指向0CarNode *top。//用來(lái)表示“到達(dá)”或者“離開”的狀態(tài), int ArriveTime。//指向下一個(gè)節(jié)點(diǎn)的指針}QNode。bool InitStack(CarStack amp。//說(shuō)明內(nèi)存分配失敗,返回false } = 。Q)//此函數(shù)用來(lái)初始化隊(duì)列{ =(QNode *)malloc(sizeof(QNode))。 next =0。qnode)//此函數(shù)用來(lái)入隊(duì)一個(gè)節(jié)點(diǎn){ QNode *p=(QNode *)malloc(sizeof(QNode))。pCondition = 。 next =p。Q,QNode amp。 =pArriveTime 。 next =pnext 。}void InitCarNode(CarNode amp。=license。return false。(* ).License = 。S,CarNode amp。//棧頂指針下移 =(* ).ArriveTime 。return true。}bool IsStackEmputy(CarStack amp。Q)//此函數(shù)用來(lái)判斷隊(duì)列是否為空{(diào) if( == )return true。if(!IsStackEmputy(S)){ CarNode *p= 。}return tag。while(p!=){ if((*p).License ==a) tag=true。S,Queue amp。return 。A39。//停在通道上++CountForQueue。 =39。Push(S,carnode)。S,Queue amp。return 。//標(biāo)志這個(gè)停車場(chǎng)出車以前是否已滿,默認(rèn)為沒有滿tag1=IsStackFull(S)。//用來(lái)保存暫時(shí)取出的汽車bool tag3=false。Push(tempstack,temp)。//進(jìn)入暫存棧}while(!IsStackEmputy(tempstack))//倒出的車再次進(jìn)入停車場(chǎng){ Pop(tempstack,temp)。amp。CountForQueue。 = 。tag3==false)// 如果停車場(chǎng)沒有滿,并且離開成功CountForStack。cout 1: 停車endl。int tag。tag!=2amp。unsigned int a2。 cina2。 cina1。 break。cout*******************按E/e退出,按任意鍵返回菜單**************************endl。amp。)showmenu(S,Q)。InitQueue(carqueue)。 int min。 Time leave。}SeqStackCar。//用隊(duì)列結(jié)點(diǎn)定義,構(gòu)造停車場(chǎng)外的單個(gè)等候車輛typedef struct Node{ QueueNode *head。 //初始化堆棧函數(shù)聲明int InitQueue(LinkQueueCar *)。 /*查看停車場(chǎng)內(nèi)車輛情況及便道上車輛情況的函數(shù)聲明*/void main( ){ SeqStackCar Enter,Temp。Enter)。Wait)。 coutendl車輛到達(dá)登記請(qǐng)按 1。//系統(tǒng)選項(xiàng)設(shè)置while(1) { cina。 else coutendl請(qǐng)選擇: 1~4.。break。Wait)。//調(diào)用查看函數(shù) case 4:exit(0)。}int InitQueue(LinkQueueCar *Q)//隊(duì)列初始化{ Qhead=new QueueNode 。 }else return 1。 cout離開車輛的車牌號(hào)為:。 A=p。 coutendl應(yīng)交費(fèi)用為: ((CA)*60+(DB))*price元endl。}int Arrival(SeqStackCar *Enter,LinkQueueCar *W){ CarNode *p。 cout車輛到達(dá)登記開始:endl。 coutendl車輛在車場(chǎng)第Entertop位置.。 cout*********************************************************************endl。 coutendl該車須在便道等待!有車位時(shí)進(jìn)入車場(chǎng)endl。 Wrearnext=t。 CarNode *p,*t。 coutendl請(qǐng)輸入車在車場(chǎng)的位置/1Entertop/:。room=Entertop) break。 if(room=1amp。 if(Entertop0) { while(1) { cout*********************************************************************endl。 return 1。 tdata=p。 return 1。 cinpp。 cinpnum。 p=new CarNode。 cout*********************************************************************endl。 C=p。 coutendl其到達(dá)時(shí)間為: p:p。 cout\n車輛離開的時(shí)間:。 Qrear=Qhead。 }}}void InitStack(SeqStackCar *s) //堆棧初始化{ stop=0。//調(diào)用出停車場(chǎng)函數(shù) case 3:List(Enter,Wait)。Enter,amp。Enter,amp。amp。 cout車輛??坎樵冋?qǐng)按 3。 cout 歡迎光臨停車場(chǎng)!。Temp)。//便道隊(duì)列 int a。 //車輛進(jìn)入時(shí)登記函數(shù)聲明void Leave(SeqStackCar *,SeqStackCar *,LinkQueueCar *)。}LinkQueueCar。 struct car *next。//定義每輛車的牌號(hào),進(jìn)入時(shí)刻,開出時(shí)刻typedef struct NODE{ CarNode *stack[MAX+1]。//定義時(shí)間結(jié)點(diǎn)typedef struct node{ string num。}三:includeiostreamincludestringusing namespace std。InitStack(carstack)。ch!=39。if(ch!=39。 break。 cina2。 break。 cina1。tag!=3) cintag。while(tag!=1amp。cout 3: 退出endl。S,Queue amp。 }if(tag2==trueamp。 = 。amp。}QNode tempqnode。break。if( ==a2){ if(a1 ){ cout輸入有誤,離開時(shí)間不能小于到達(dá)時(shí)間,離開失敗endl。//標(biāo)志通道是否有汽車在等待, 默認(rèn)為通道為空tag2=IsQueueEmputy(Q)。InitStack(tempstack)。return 。cout車號(hào): 到達(dá)時(shí)間 停在停車場(chǎng)的第CountForStack號(hào)位置endl。 =1。}else{ CarNode carnode。//定義為1,說(shuō)明還沒有開始離開 =a2。 =1。return 。}return tag。Q,int a)//a表示要查找的車牌號(hào),{ bool tag=false。p。}bool SearchInStack(CarStackamp。else return false。S)//此函數(shù)用來(lái)判斷堆棧是否已滿{ if( = )return true。 =(* ).LeaveTime 。return false。//棧頂指針上移return true。(* ).Condition = 。S,CarNode amp。 =condition。free(p)。 =pLeaveTime 。return false。return true。pLicense = 。return false。}bool EnQueue(Queue amp。return false。return true。if(! ){ cout內(nèi)存分配失?。ndl。//隊(duì)頭指針QNode *rear。// 用來(lái)記錄離開時(shí)間,默認(rèn)為1,說(shuō)明還沒有離開int License。//棧的容量大小}CarStack。// 記錄車牌號(hào) }CarNode。// 此全局變量用來(lái)計(jì)數(shù)隊(duì)列現(xiàn)有的車數(shù)typedef struct//這個(gè)節(jié)點(diǎn)用來(lái)保存每輛車的信息{ char Condition 。 return cmd。amp。amp。amp。amp。amp。amp。amp。 printf(\n)。 printf(Input C,D,P,E choose!!\n)。 gotoxy(1,20)。 gotoxy(15,14)。 gotoxy(15,12)。i=240。 } }}/********************************************************************************/void initialization() /*初始函數(shù)*/{ int i。exit(0)。 case 39。: printf(Press any to continue...)。road)。P39。temp,amp。 case 39。part,amp。 break。: Departure(amp。road)。 case 39。: Arrive(amp。 /*初始化界面*/ cmd = readmand()。road)。part)。main(){ char cmd。void Print(SqStackCar *In,SqStackCar *temp,LinkQueueCar *Wait)。 printf(Press any key to continue...)。 puts(pnum)。 if(Waitfront!=Waitrear) /**/ { while(q!=NULL) { p=qdata。139。 Push(In,t)。 printf(%d,count)。 while(!StackEmpty(*In)) { Pop(In,t)。if(c==39。amp。amp。 printf(\n)。 gotoxy(1,12)。 gotoxy(1,10)。amp。 q=(QueueNode *)malloc(sizeof(QueueNode))。}/*****************************************************************
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1