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

正文內(nèi)容

計(jì)算機(jī)數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì)報(bào)告(doc畢業(yè)設(shè)計(jì)論文)(編輯修改稿)

2025-07-20 06:47 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 time:/**:**/)。 scanf(%d:%d,amp。(p),amp。(p))。 printf(\nthe number of the car:)。 puts(pnum)。 printf(\nthe time the car arrive: %d:%d,p,p)。 printf(the depart time: %d:%d,p,p)。 A1=p。 A2=p。 B1=p。 B2=p。 printf(\nthe fee: %,((B1A1)*60+(B2A2))*price)。 free(p)。 } C)此函數(shù)實(shí)現(xiàn)的功能是實(shí)現(xiàn)汽車(chē)進(jìn)停車(chē)場(chǎng)的操作。第一步操作是確定要進(jìn)停車(chē)場(chǎng)車(chē)的車(chē)牌號(hào),然后通過(guò)函數(shù)if(EntertopMAX)來(lái)判斷棧是否已滿,未滿則執(zhí)行if()函數(shù),令棧頂加1,視為一輛車(chē)進(jìn)入停車(chē)場(chǎng),并輸入此時(shí)時(shí)間,用p,p。若車(chē)場(chǎng)已滿則進(jìn)入便道,由隊(duì)列實(shí)現(xiàn)。/*車(chē)輛到達(dá)*/int Arrival(SeqStackCar *Enter,LinkQueueCar *W) { CarNode *p。 QueueNode *t。 p=(CarNode *)malloc(sizeof(CarNode))。 flushall()。 printf(\ninput the number of the car(例:1234):)。 gets(pnum)。 if(EntertopMAX) /*車(chē)場(chǎng)未滿,車(chē)進(jìn)車(chē)場(chǎng)*/ { Entertop++。 printf( \nthe place of the car: %d ,Entertop)。 printf(\nthe time thecar arrive:/**:**/)。 scanf(%d:%d,amp。(p),amp。(p))。 Enterstack[Entertop]=p。 return(1)。 } else /*車(chē)場(chǎng)已滿,車(chē)進(jìn)便道*/ { printf(\n該車(chē)須在便道等待.)。 t=(QueueNode *)malloc(sizeof(QueueNode))。 tdata=p。 tnext=NULL。 Wrearnext=t。 Wrear=t。 return(1)。 } } D)此函數(shù)實(shí)現(xiàn)的功能是實(shí)現(xiàn)車(chē)出停車(chē)場(chǎng)時(shí)的操作。包括顯示車(chē)的位置,車(chē)進(jìn)、出停車(chē)場(chǎng)的時(shí)間,得出應(yīng)交納的費(fèi)用。然后便道上等候的車(chē)進(jìn)入停車(chē)場(chǎng)。通過(guò)函數(shù)if(Entertop0)來(lái)判斷棧是否為空,如不為空,則執(zhí)行if()函數(shù)。之后第一個(gè)while(1)函數(shù)的作用是確定出停車(chē)場(chǎng)車(chē)的位置。第二個(gè)while(Entertoproom)函數(shù)作用是令存儲(chǔ)在棧內(nèi)選定位置上方的數(shù)據(jù)存入臨時(shí)棧Temp,令選定位置處于棧的頂端。之后取出棧頂元素。取出之后再用第三個(gè)while(Temptop=1)函數(shù)將臨時(shí)棧Temp中數(shù)據(jù)依次返回停車(chē)場(chǎng)棧中。之后當(dāng)停車(chē)場(chǎng)中留出空位,執(zhí)行函數(shù)if((Whead!=Wrear)amp。amp。EntertopMAX)將便道中車(chē)存入停車(chē)場(chǎng)棧中。/*車(chē)輛離開(kāi)*/void Leave(SeqStackCar *Enter,SeqStackCar *Temp,LinkQueueCar *W) { int room。 CarNode *p,*t。 QueueNode *q。 /*判斷車(chē)場(chǎng)內(nèi)是否有車(chē)*/ if(Entertop0) /*有車(chē)*/ { while(1) /*輸入離開(kāi)車(chē)輛的信息*/ { printf(\n請(qǐng)輸入車(chē)在車(chē)場(chǎng)的位置/1%d/:,Entertop)。 scanf(%d,amp。room)。 if(room=1amp。amp。room=Entertop) break。 } while(Entertoproom) /*車(chē)輛離開(kāi)*/ { Temptop++。 Tempstack[Temptop]=Enterstack[Entertop]。 Enterstack[Entertop]=NULL。 Entertop。 } p=Enterstack[Entertop]。 Enterstack[Entertop]=NULL。 Entertop。 while(Temptop=1) { Entertop++。 Enterstack[Entertop]=Tempstack[Temptop]。 Tempstack[Temptop]=NULL。 Temptop。 } PRINT(p,room)。 /*判斷通道上是否有車(chē)及車(chē)站是否已滿*/ if((Whead!=Wrear)amp。amp。EntertopMAX) /*便道的車(chē)輛進(jìn)入車(chē)場(chǎng)*/ { q=Wheadnext。 t=qdata。 Entertop++。 printf(\n便道的%s號(hào)車(chē)進(jìn)入車(chē)場(chǎng)第%d位置.,tnum,Entertop)。 printf(\n請(qǐng)輸入現(xiàn)在的時(shí)間/**:**/:)。 scanf(%d:%d,amp。(t),amp。(t))。 Wheadnext=qnext。 if(q==Wrear) Wrear=Whead。 Enterstack[Entertop]=t。 free(q)。 } else printf(\n便道里沒(méi)有車(chē).\n)。 } else printf(\n車(chē)場(chǎng)里沒(méi)有車(chē).)。 /*沒(méi)車(chē)*/ }E)主函數(shù)實(shí)現(xiàn)了用戶界面。并通過(guò)調(diào)用各自定義函數(shù),實(shí)現(xiàn)了停車(chē)場(chǎng)管理系統(tǒng)的模擬。void main() { SeqStackCar Enter,Temp。 LinkQueueCar Wait。 int ch。 InitStack(amp。Enter)。 /*初始化停車(chē)場(chǎng)*/ InitStack(amp。Temp)。 /*初始化讓路的臨時(shí)棧*/ InitQueue(amp。Wait)。 /*初始化通道*/ while(1) { printf(\n**********************************************)。 printf(\n 1. the car arrive)。 printf( 2. the car leave)。 printf( 3. quit\n)。 printf(**********************************************\n)。 while(1) { scanf(%d,amp。ch)。 if(ch=1amp。amp。ch=4)break。 else printf(\nplease choose: 1|2|3)。 } switch(ch) { case 1:Arrival(amp。Enter,amp。Wait)。break。 /*車(chē)輛到達(dá)*/ case 2:Leave(amp。Enter,amp。Temp,amp。Wait)。break。 /*車(chē)輛離開(kāi)*/ case 3:exit(0)。 /*退出程序*/ default: break。 } } }四、調(diào)試分析此程序輸入輸出的數(shù)據(jù)都為整型(int)。線程控制,使程序達(dá)到參數(shù)即時(shí)可控,同時(shí)提高程序的健壯性。上機(jī)過(guò)程中遇到過(guò)一些錯(cuò)誤,主要是語(yǔ)法錯(cuò)誤經(jīng)過(guò)我的再三排查終于改正了錯(cuò)誤。程序功能:模擬停車(chē)場(chǎng)管理系統(tǒng),一狹長(zhǎng)結(jié)構(gòu)停車(chē)場(chǎng),一次只允許一輛車(chē)進(jìn)出。當(dāng)停車(chē)場(chǎng)未滿時(shí),車(chē)進(jìn)停車(chē)場(chǎng),當(dāng)滿時(shí),車(chē)進(jìn)便道。當(dāng)停車(chē)場(chǎng)內(nèi)某輛車(chē)要離開(kāi)時(shí),在它之后進(jìn)入的車(chē)必須先退出車(chē)場(chǎng)為他讓路,待該車(chē)開(kāi)出大門(mén)外,其他車(chē)再按原次序進(jìn)入車(chē)場(chǎng),每輛停放在車(chē)場(chǎng)的車(chē)在它離開(kāi)車(chē)場(chǎng)時(shí)必須按它停留的時(shí)間長(zhǎng)短交納費(fèi)用。五、用戶手冊(cè) 1. 輸入進(jìn)站車(chē)信息,界面:2.輸入出站信息,界面:3.便道車(chē)入站,界面:六.測(cè)試結(jié)果第一組:輸入數(shù)據(jù):1 車(chē)牌號(hào):1234 到達(dá)時(shí)間12:12 2 離開(kāi)車(chē)位置:1 離開(kāi)時(shí)間 12:34輸出數(shù)據(jù):出站車(chē)牌號(hào) 1234 到達(dá)時(shí)間 12:12 離開(kāi)時(shí)間:12:34 收費(fèi):第二組:輸入數(shù)據(jù):1 車(chē)牌號(hào):1234 到達(dá)時(shí)間 12:12 輸入數(shù)據(jù):1 車(chē)牌號(hào):1122 到達(dá)時(shí)間 13:01 2 離開(kāi)車(chē)位置:1 離開(kāi)時(shí)間 14:00輸出數(shù)據(jù):出站車(chē)牌號(hào) 1234 到達(dá)時(shí)間 12:12 離開(kāi)時(shí)間:14:00 收費(fèi):七、附錄停車(chē)場(chǎng)管理源代碼:include include include define MAX 2 /*車(chē)庫(kù)容量*/ define price /*每車(chē)每分鐘費(fèi)用*//*定義數(shù)據(jù)類(lèi)型*/ /*時(shí)間結(jié)點(diǎn)*/ typedef str
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1