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

正文內(nèi)容

數(shù)據(jù)結(jié)構(gòu)c語言版課程設(shè)計停車場管理系統(tǒng)-展示頁

2024-08-22 07:32本頁面
  

【正文】 ************ 車輛到達(dá) ***************************///參數(shù):停車棧 停車隊(duì)列 車輛信息//返回值:空//功能:對傳入的車輛進(jìn)行入棧 棧滿則入隊(duì)列void Arrive(SqStackCar *stop,LinkQueueCar *lq,CarNode x){ int f。 qfrontnum。 n=pnum。 qfrontnext=pnext。 if(qfront==qrear) //隊(duì)空返回0 return(0)。 //隊(duì)列元素個數(shù)加1 }/*數(shù)據(jù)出隊(duì)列*/ int DeLinkQueue(LinkQueueCar *q) { QueueNode *p。 //新結(jié)點(diǎn)入隊(duì)列 qrear=p。 pnext=NULL。 p=(QueueNode*)malloc(sizeof(QueueNode))。 qfrontnum=0。 //產(chǎn)生一個新結(jié)點(diǎn),作頭結(jié)點(diǎn) if(qfront!=NULL) { qrear=qfront。 return(sstack[stop+1])。 return(x)。 =0。 }} /*棧頂元素出棧*/CarNode pop(SqStackCar *s) { CarNode x。 //如果棧滿,返回0 else { sstack[++stop]=x。 /*初始化棧*/void InitSeqStack(SqStackCar *s) { stop=1。void printstop(int a,int num,int x0,int y0)。void gotoxy(int x,int y)。CarNode getcarInfo()。}LinkQueueCar。}QueueNode。typedef struct node /*定義隊(duì)列結(jié)點(diǎn)的類型*/{int num。 int top。 /*到達(dá)時刻或離區(qū)時刻*/}CarNode。 /*時間結(jié)點(diǎn)*/typedef struct /*定義棧元素的類型即車輛信息結(jié)點(diǎn)*/{int num 。 int minute。 課程設(shè)計:停車場 c語言版本的數(shù)據(jù)結(jié)構(gòu)課程設(shè)計,要求用棧模擬停車場,用隊(duì)列模擬便道,實(shí)現(xiàn)停車場的收費(fèi)管理系統(tǒng)停車場停滿車后車會停在便道上面下面附上源碼,vc:(下編譯include //include //mallocinclude //獲取系統(tǒng)時間所用函數(shù) include //getch()include //設(shè)置光標(biāo)信息 mallcodefine MaxSize 5 /*定義停車場棧長度*/define PRICE /*每車每分鐘收費(fèi)值*/define BASEPRICE //基礎(chǔ)停車費(fèi)define Esc 27 //退出系統(tǒng)define Exit 3 //結(jié)束對話define Stop 1 //停車define Drive 2 //取車int jx=0,jy=32。 //全局變量日志打印位置typedef struct{int hour。}Time,*PTime。 /*車牌號*/ Time arrtime。typedef struct /*定義棧,模擬停車場*/{CarNode stack[MaxSize]。}SqStackCar。 /*車牌號*/ struct node *next。typedef struct /*定義隊(duì)列,模擬便道*/{QueueNode *front,*rear。/*函數(shù)聲明*/PTime get_time()。void qingping(int a)。void printlog(Time t,int n,int io,char ab,int po,double f)。void printleave(int a,int po,int num)。}/* push入站函數(shù) */int push(SqStackCar *s,CarNode x) //數(shù)據(jù)元素x入指針s所指的棧{ if(stop==MaxSize1) return(0)。 //棧不滿,到達(dá)車輛入棧 return(1)。 if(stop0) { =0。 =0。 //如果棧空,返回空值 } else { stop。 //棧不空,返回棧頂元素 } }/*初始化隊(duì)列*/void InitLinkQueue(LinkQueueCar *q) { qfront=(QueueNode*)malloc(sizeof(QueueNode))。 qfrontnext=NULL。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1