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

正文內(nèi)容

數(shù)據(jù)結(jié)構(gòu)課程結(jié)構(gòu)設(shè)計(jì)-文庫(kù)吧

2025-06-08 15:42 本頁(yè)面


【正文】 int hour。 int min。 }Time。 /*用于計(jì)算停車時(shí)間以便計(jì)算停車費(fèi)用*/typedef struct node{ char carnum[10]。 Time reach。 Time go。 }Car。 /*車輛信息結(jié)點(diǎn)*/ typedef struct NODE{ Car *stack[150]。 int top。 }SqStack。 /*定義一個(gè)棧作為停車站*/typedef struct car{ Car *data。 struct car *next。 }QNode。 /*定義一個(gè)車結(jié)構(gòu)*/ typedef struct Node{ QNode *front。 QNode *rear。 }LinkQueue。 /*等待通道*/ void InitStack(SqStack *s) /*初始化棧*/ { int i。 stop=0。 for(i=0。i=N。i++) sstack[stop]=NULL。 } int InitQueue(LinkQueue *Q) /*初始化便道*/ { Qfront=(QNode *)malloc(sizeof(QNode))。 if(Qfront!=NULL) { Qfrontnext=NULL。 Qrear=Qfront。 return(1)。 } else return(1)。 } int arrive(SqStack *In,LinkQueue *W) /*車輛到達(dá)*/ { Car *p。 QNode *t。 p=(Car *)malloc(sizeof(Car))。 flushall()。 printf(\n\t\t停車場(chǎng)還有%d個(gè)停車位,NIntop)。 printf(\n\t\t請(qǐng)輸入車牌號(hào)碼:)。 gets(pcarnum)。 if(IntopN) /*停車場(chǎng)未滿,車進(jìn)車場(chǎng)*/ { Intop++。 printf(\n\t\t停車的位置:%d號(hào)停車位。,Intop)。 printf(\n\t\t請(qǐng)輸入車到達(dá)的時(shí)間(格式“**:**”):)。 scanf(%d:%d,amp。(p),amp。(p))。 Instack[Intop]=p。 printf(\t\t請(qǐng)按任意鍵返回)。 getch()。 return(1)。 } else /*停車場(chǎng)已滿,車進(jìn)便道*/ { printf(\n\t\t停車位已滿,該車須在便道等待!)。 t=(QNode *)malloc(sizeof(QNode))。 tdata=p。 tnext=NULL。 Wrearnext=t。 Wrear=t。 printf(\t\t請(qǐng)按任意鍵返回)。 getch()。 return(1)。 } } void Print(Car *p,int room) /*輸出停車站車的信息*/ { int A1,A2,B1,B2。 printf(\n\t\t請(qǐng)輸入車離開(kāi)的時(shí)間(格式“**:**”):)。 scanf(%d:%d,amp。(p),amp。(p))。 printf(\n\t\t車牌號(hào)碼:)。 puts(pcarnum)。 printf(\n\t\t車到達(dá)的時(shí)間是: %d:%d,p,p)。 printf(\t\t車離開(kāi)的時(shí)間是: %d:%d,p,p)。 A1=p。 A2=p。 B1=p。 B2=p。 printf(\n\t\t費(fèi)用為: %d元,(((B1A1)*60+(B2A2))))。 free(p)。 }void go(SqStack *In,SqStack *Out,LinkQueue *W) /*車輛離開(kāi)*/ { int locate。 Car *p,*t。 QNode *q。 /*判斷車場(chǎng)內(nèi)是否有車*/ if(Intop0) /*有車*/ { while(1) /*輸入離開(kāi)車輛的信息*/ { printf(\n\t\t請(qǐng)輸入車在停車場(chǎng)的位置:,Intop)。 scanf(%d,amp。locate)。 if(locate=1amp。amp。locate=Intop) break。 } while(Intoplocate) /*車輛離開(kāi)*/ { Outtop++。 Outstack[Outtop]=Instack[Intop]。 Instack[Intop]=NULL。 Intop。 } p=Instack[Intop]。 Instack[Intop]=NULL。 Intop。 while(Outtop=1) { Intop++。 Instack[Intop]=Outstack[Outtop]。 Outstack[Outtop]=NULL。 Outtop。 } Print(p,locate)。 /*判斷通道上是否有車及車站是否已滿*/ if((Wfront!=Wrear)amp。amp。In
點(diǎn)擊復(fù)制文檔內(nèi)容
職業(yè)教育相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1