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

正文內(nèi)容

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

2025-07-20 06:47 本頁面
 

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