道尔智控 > 停车场系统 > (停车场管理系统c)停车场管理系统c语言

(停车场管理系统c)停车场管理系统c语言

导读停车场管理系统c语言代码本文最佳回答用户:【-哥的生活叫逍遥°】 ,现在由道尔智控小编为你探讨与【停车场管理系统c】的相关内容!答/*初始化停车场信息,初始状态为第一层已经...

本文中提到了6个关于停车场管理系统c的相关看点,同时还对停车场管理系统c语言也有不同的看法,希望本文能为您找到想要的答案,记得关注哦!

停车场管理系统c语言代码

本文最佳回答用户:【-哥的生活叫逍遥°】 ,现在由道尔智控小编为你探讨与【停车场管理系统c】的相关内容!

/*初始化停车场信息,初始状态为第一层已经停有4辆车,

* 其车位号依次为1—4 , 停车时间依次为20, 15, 10 , 5

*/

void Init(struct Garage gar[][6])

{

int i, j;

/*给所有的车位的层号,车位号初始化,停车时间初始化为0,停车位全都初始化为空*/

for (i=0; i<2; i++)

{

for (j=0; j<6; j++)

{

gar[i][j].lay = i+1;

gar[i][j].garagenum = j+1;

gar[i][j].time = 0;

gar[i][j].isempty = 1;

}

}

/*第一层的1-4号车位停车*/

for (i=0; i<4; i++)

{

gar[0][i].isempty = 0;

}

strcpy(gar[0][0].carnum, "GF8888"); /*我自己初始化的车牌号,你可以自己改一下*/

gar[0][0].time = 20;

strcpy(gar[0][1].carnum, "GF6666");

gar[0][1].time = 15;

strcpy(gar[0][2].carnum, "GF9999");

gar[0][2].time = 10;

strcpy(gar[0][3].carnum, "GF5858");

gar[0][3].time = 5;

}

/*新停入的汽车后,将在此之前的所有车的停车时间加5*/

void AddTime(struct Garage gar[][6])

{

int i, j;

for (i=0; i<2; i++)

{

for (j=0; j<6; j++)

{

if (gar[i][j].isempty == 0)

{

gar[i][j].time += 5;

}

}

}

}

/*停车*/

void Park(struct Garage gar[][6])

{

int i;

char num[8];

printf("请输入车牌号:");

scanf("%s", num);

/*查找空车位*/

for (i=0; i<6; i++)

{

if (gar[0][i].isempty == 1)

{

printf("第一层第%d号车位空着,请在此处停车\n", i+1);

strcpy(gar[0][i].carnum, num);

printf("车牌号:%s 层号:1 车位号: %d \n", num, i+1);

AddTime(gar); /*在此之前停车的所有汽车时间加5*/

gar[0][i].isempty = 0; /*表示该车为已经停车*/

gar[0][i].time = 5; /*将时间设为5*/

return;

}

}

printf("第一层已经没有空车位\n");

for (i=0; i<6; i++)

{

if (gar[1][i].isempty = 1)

{

printf("第二层第%d号车位空着,请在此处停车\n", i+1);

strcpy(gar[1][i].carnum, num);

printf("车牌号:%s 层号:2 车位号: %d \n", num, i+1);

AddTime(gar); /*在此之前停车的所有汽车时间加5*/

gar[1][i].isempty = 0; /*表示该车为已经停车*/

gar[1][i].time = 5; /*将时间设为5*/

return;

}

}

printf("对不起,1 2层都没有空车位,您现在不能在此停车\n");

}

/*查看所有车辆信息*/

void Information(struct Garage gar[][6])

{

int i, j;

printf(" 车牌号 层号 车位号 停车时间\n");

for (i=0; i<2; i++)

{

for(j=0; j<6; j++)

{

if (gar[i][j].isempty == 0)

printf(" %s%8d%8d%8d\n", gar[i][j].carnum, gar[i][j].lay, gar[i][j].garagenum, gar[i][j].time);

}

}

printf("\n");

}

/*取车*/

double Leave(struct Garage gar[2][6])

{

int i, j;

char num[8];

double charge = 0;

printf("请输入要取的车牌号:");

scanf("%s", num);

for (i=0; i<2; i++)

{

for (j=0; j<6; j++)

{

if (!strcmp(gar[i][j].carnum, num))

{

printf("您在%d层%d车位停车%d分钟\n", gar[i][j].lay, gar[i][j].garagenum, gar[i][j].time);

charge = gar[i][j].time/5*0.2;

printf("停车费用为每5分钟0.2元,您需交%.2lf元\n", charge);

gar[i][j].isempty = 1;

return charge;

}

}

}

printf("没有您输入的车号。\n\n");

return charge;

}

/*是否查看总收入*/

void IsPrintTotal(double total)

{

char ch;

printf("是否查看停车收费总计?Y/N");

scanf("%c", &ch);

while (ch!='y' && ch!='Y' && ch!='n' && ch!='N')

{

printf("请输入Y或N ");

scanf("%c", &ch);

printf("\n");

}

switch (ch)

{

case 'Y':

case 'y':

printf("停车收费总计为%.2lf元\n", total);

break;

case 'N':

case 'n':

break;

}

}

main()

{

int choice;

double total = 0;

struct Garage gar[2][6];

Init(gar); //初始化第一层已经停有的4辆车

while (1)

{

Instruction();

printf("请输入要进行的操作:");

scanf("%d", &choice);

while (choice<0 || choice>3)

{

printf("输入的不合法,请输入0-3选择:");

scanf("%d", &choice);

}

switch (choice)

{

case 1:

Park(gar);

break;

case 2:

total += Leave(gar);

IsPrintTotal(total);

break;

case 3:

Information(gar);

break;

case 0:

exit(0);

}

}

return 0;

}

以上就是道尔智控小编解疑贡献者:(-哥的生活叫逍遥°)分析的关于“停车场管理系统c语言代码”的问题了,不知是否已经解决你的问题?如果没有,下一篇内容可能是你想要的答案,下面继续解读下文用户【不温柔。】回答的“停车场管理数据结构c语言版”的一些相关疑点做出分析与解答,如果能找到你的答案,可以关注本站。

停车场管理系统c语言代码

停车场管理数据结构c语言版

本文最佳回答用户:【不温柔。】 ,现在由道尔智控小编为你解答与【停车场管理系统c】的相关内容!

你的问题是

可以参考用C编写的数据结构中栈和队列来实现.

发觉你设计的停车收费还是有些问题,"在它之后进入停车场的车辆都必须退出停车场为它让路,待其开出停车场后,这些车再按照原先的顺序进场"这段时间是否计费,还有这样设置停车方式未免效率太低了,为什么不设置一个出口和一个入口呢,这样用队列实现就比较方便了.

以上就是道尔智控小编解答(不温柔。)贡献关于“停车场管理数据结构c语言版”的答案,接下来继续为你详解用户(洄忆dē“独奏)分析“停车场代码c语言简单”的一些相关解答,希望能解决你的问题!

停车场代码c语言简单

本文最佳回答用户:【洄忆dē“独奏】 ,现在由道尔智控小编为你解答与【停车场管理系统c】的相关内容!

细节上的优化就看Lz怎么想了,我觉得提示做得还不够好,免强能用了。

#include

#include

#define N 3 /*停车场大小*/

#define MAX 50 /*过道大小*/

#define sign 10/*车牌大小*/

#define price 10/*每分钟的价钱*/

char part[N][sign];

char Rpart[MAX][sign];

char time[N][20];

int P,R;

partadd(char *t)

{

strcpy(&part[P][0],t);

printf("请输入时间:例如十点十分格式为“10.10”\n");

scanf("%s",&time[P][0]);

getchar();

P++;

}

Rpartadd(char *t)

{

if(R<MAX)

{

strcpy(&Rpart[R][0],t);

R++;

}

else

{

printf("过道己满。无法停车。\n");

}

}

newcar()

{

char temp[sign];

printf("请输入车牌号:");

scanf("%s",temp);

getchar();

if(P<N)

{

partadd(temp);

}

else if(R<MAX)

{

Rpartadd(temp);

}

}

int timed(char *t1,char *t2)

{

int i=0,y=0,x=0,j,n=1;

while(1)

{

if(t1[i]=='.')

{

for(j=i-1;j>=0;j--)

{

y=y+(t1[j]-'0')*(60*n);

n=n*10;

}

while(1)

{

if(t1[j]==NULL)

{

for(n=1;j>i;j--)

{

y=y+(t1[j]-'0')*n;

n=n*10;

}

break;

}

j++;

}

i=0;

while(1)

{

if(t2[i]=='.')

{

for(j=i-1;j>=0;j--)

{

x=x+(t2[j]-'0')*(60*n);

n=n*10;

}

while(1)

{

if(t2[j]==NULL)

{

for(n=1;j>i;j--)

{

x=x+(t2[j]-'0')*n;

n=n*10;

}

break;

}

j++;

}

y=(x-y)*price;

return y;

}

i++;

}

}

i++;

}

}

partcarout(int i)

{

int j,money;

char t[20];

printf("请输入现在的时间:例如十点十分格式为“10.10”\n");

scanf("%s",t);

getchar();

money=timed(t,&time[i][0]);

printf("收费%d\n",money);

for(j=i;j<P;j++)

{

strcpy(&part[j][0],&part[j+1][0]);

P--;

}

if(R!=0)

{

strcpy(&part[N-1][0],&Rpart[0][0]);

P++;

strcpy(&time[P][0],t);

Rpartcarout(0);

}

}

Rpartcarout(int i)

{

int j;

for(j=i;j<R;j++)

{

strcpy(&Rpart[j][0],&Rpart[j+1][0]);

R--;

}

}

carout()

{

char t[sign];

int i,get=0;

printf("请入要离开的车牌号:");

scanf("%s",t);

getchar();

for(i=0;i<P;i++)

{

if(strcmp(t,&part[i][0])==0)

{

get=1;

partcarout(i);

break;

}

}

for(i=0;i<R&&get==0;i++)

{

if(strcmp(t,&Rpart[i][0])==0)

{

get=1;

Rpartcarout(i);

break;

}

}

if(get==0)

{

printf("查无此车。\n");

}

}

jopart()

{

int i;

for(i=0;i<P;i++)

{

printf("%d.%s\n",i,&part[i][0]);

}

}

joRpart()

{

int i;

for(i=0;i<R;i++)

{

printf("%d.%s\n",i,&Rpart[i][0]);

}

}

main()

{

int c;

while(1)

{

printf("请选择要做的事:\n");

printf("1.加入新车。\n");

printf("2.有车离开。\n");

printf("3.显示在停车场内的车。\n");

printf("4.显示在过道上的车。\n");

printf("5.退出。\n");

c=getchar();

getchar();

switch (c)

{

case '1':newcar();

break;

case '2':carout();

break;

case '3':jopart();

break;

case '4':joRpart();

break;

case '5':exit(1);

break;

}

}

}

以上就是道尔智控小编解疑贡献者:(洄忆dē“独奏)回答的关于“停车场代码c语言简单”的问题了,不知是否已经解决你的问题?如果没有,下一篇内容可能是你想要的答案,下面继续教妳下文用户【吹皱一池春水】分享的“停车场管理系统c语言代码”的一些相关疑问做出分析与解答,如果能找到你的答案,可以关注本站。

停车场管理系统c语言代码

本文最佳回答用户:【吹皱一池春水】 ,现在由道尔智控小编为你探讨与【停车场管理系统c】的相关内容!

这道题的难度不亚于一个C语言的课程设计哈,在这提问不太合适。

就提供给你思路吧。

职工信息可以存入一个结构体数组中,此结构体元素包含有货物编号(unsigned int cargo_number;);货物名称(char cargo_name[10];);货物价格(unsigned int cargo_price;);货物数量(unsigned int cargo_price;)。其他元素,题主根据要求添加元素。

然后,构建函数用来添加货物名称:void add_cargo_info(.)(形参元素为结构体数组名),即手动添加货物信息,完事后记得要将信息写入磁盘文件中;

然后,构建函数显示信息,这个简单,void display_cargo_info(.)(形参为结构体数组名),用一个while循环输出即可;

然后,查询函数,void cargo_info_search(.)(形参可为多种,名字,编号。),同样用while循环搞定;

然后,修改信息,void cargo_info_update(.)(形参同为结构体数组),调用查找函数,找到要修改的货物,然后在此信息中修改即可;

然后,删除信息,void cargo_info_delete(.)(形参同为结构体数组),也是首先找到要删除的信息,然后要调用保存函数。

这个就是我的思路,题主可以参考,希望解决了题主的问题。

以上就是道尔智控小编解答(吹皱一池春水)解答关于“停车场管理系统c语言代码”的答案,接下来继续为你详解用户(淡看悲欢离合)回答“用c语言编写停车场管理系统”的一些相关解答,希望能解决你的问题!

用c语言编写停车场管理系统

本文最佳回答用户:【淡看悲欢离合】 ,现在由道尔智控小编为你探讨与【停车场管理系统c】的相关内容!

程序太大 不让发 我是分几次发过去的 打三个出现乱码了 我在重新发一次

/*初始化停车场信息,初始状态为第一层已经停有4辆车,

* 其车位号依次为1—4 , 停车时间依次为20, 15, 10 , 5

*/

void Init(struct Garage gar[][6])

{

int i, j;

/*给所有的车位的层号,车位号初始化,停车时间初始化为0,停车位全都初始化为空*/

for (i=0; i<2; i++)

{

for (j=0; j<6; j++)

{

gar[i][j].lay = i+1;

gar[i][j].garagenum = j+1;

gar[i][j].time = 0;

gar[i][j].isempty = 1;

}

}

/*第一层的1-4号车位停车*/

for (i=0; i<4; i++)

{

gar[0][i].isempty = 0;

}

strcpy(gar[0][0].carnum, "GF8888"); /*我自己初始化的车牌号,你可以自己改一下*/

gar[0][0].time = 20;

strcpy(gar[0][1].carnum, "GF6666");

gar[0][1].time = 15;

strcpy(gar[0][2].carnum, "GF9999");

gar[0][2].time = 10;

strcpy(gar[0][3].carnum, "GF5858");

gar[0][3].time = 5;

}

/*新停入的汽车后,将在此之前的所有车的停车时间加5*/

void AddTime(struct Garage gar[][6])

{

int i, j;

for (i=0; i<2; i++)

{

for (j=0; j<6; j++)

{

if (gar[i][j].isempty == 0)

{

gar[i][j].time += 5;

}

}

}

}

/*停车*/

void Park(struct Garage gar[][6])

{

int i;

char num[8];

printf("请输入车牌号:");

scanf("%s", num);

/*查找空车位*/

for (i=0; i<6; i++)

{

if (gar[0][i].isempty == 1)

{

printf("第一层第%d号车位空着,请在此处停车\n", i+1);

strcpy(gar[0][i].carnum, num);

printf("车牌号:%s 层号:1 车位号: %d \n", num, i+1);

AddTime(gar); /*在此之前停车的所有汽车时间加5*/

gar[0][i].isempty = 0; /*表示该车为已经停车*/

gar[0][i].time = 5; /*将时间设为5*/

return;

}

}

printf("第一层已经没有空车位\n");

for (i=0; i<6; i++)

{

if (gar[1][i].isempty = 1)

{

printf("第二层第%d号车位空着,请在此处停车\n", i+1);

strcpy(gar[1][i].carnum, num);

printf("车牌号:%s 层号:2 车位号: %d \n", num, i+1);

AddTime(gar); /*在此之前停车的所有汽车时间加5*/

gar[1][i].isempty = 0; /*表示该车为已经停车*/

gar[1][i].time = 5; /*将时间设为5*/

return;

}

}

printf("对不起,1 2层都没有空车位,您现在不能在此停车\n");

}

/*查看所有车辆信息*/

void Information(struct Garage gar[][6])

{

int i, j;

printf(" 车牌号 层号 车位号 停车时间\n");

for (i=0; i<2; i++)

{

for(j=0; j<6; j++)

{

if (gar[i][j].isempty == 0)

printf(" %s%8d%8d%8d\n", gar[i][j].carnum, gar[i][j].lay, gar[i][j].garagenum, gar[i][j].time);

}

}

printf("\n");

}

/*取车*/

double Leave(struct Garage gar[2][6])

{

int i, j;

char num[8];

double charge = 0;

printf("请输入要取的车牌号:");

scanf("%s", num);

for (i=0; i<2; i++)

{

for (j=0; j<6; j++)

{

if (!strcmp(gar[i][j].carnum, num))

{

printf("您在%d层%d车位停车%d分钟\n", gar[i][j].lay, gar[i][j].garagenum, gar[i][j].time);

charge = gar[i][j].time/5*0.2;

printf("停车费用为每5分钟0.2元,您需交%.2lf元\n", charge);

gar[i][j].isempty = 1;

return charge;

}

}

}

printf("没有您输入的车号。\n\n");

return charge;

}

/*是否查看总收入*/

void IsPrintTotal(double total)

{

char ch;

printf("是否查看停车收费总计?Y/N");

scanf("%c", &ch);

while (ch!='y' && ch!='Y' && ch!='n' && ch!='N')

{

printf("请输入Y或N ");

scanf("%c", &ch);

printf("\n");

}

switch (ch)

{

case 'Y':

case 'y':

printf("停车收费总计为%.2lf元\n", total);

break;

case 'N':

case 'n':

break;

}

}

main()

{

int choice;

double total = 0;

struct Garage gar[2][6];

Init(gar); //初始化第一层已经停有的4辆车

while (1)

{

Instruction();

printf("请输入要进行的操作:");

scanf("%d", &choice);

while (choice<0 || choice>3)

{

printf("输入的不合法,请输入0-3选择:");

scanf("%d", &choice);

}

switch (choice)

{

case 1:

Park(gar);

break;

case 2:

total += Leave(gar);

IsPrintTotal(total);

break;

case 3:

Information(gar);

break;

case 0:

exit(0);

}

}

return 0;

}

以上就是道尔智控小编解答(淡看悲欢离合)贡献关于“用c语言编写停车场管理系统”的答案,接下来继续为你详解用户(捧出一束阳光)回答“c语言停车场管理系统ppt”的一些相关解答,希望能解决你的问题!

c语言停车场管理系统ppt

本文最佳回答用户:【捧出一束阳光】 ,现在由道尔智控小编为你解答与【停车场管理系统c】的相关内容!

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

#include <time.h>

#define max 3

#define price 1

int b=1;

typedef struct

{

int day;

int hour;

int min;

}TIME; //时间结点

typedef struct

{

char num[10]; //车牌号

TIME time; //进入停车场的时间

int n; //进入停车场的位置

}information;

//栈结构体定义

typedef struct node

{

information data;

struct node *next;

}stacknode; stacknode *top1,*top2;

//队列结构体定义

typedef struct

{

information data;

stacknode *front,*rear;

}LQueue;LQueue *Q;

//函数声明部分/////////////////////////////////////////////////////////

stacknode *Init(); //栈的初始化

stacknode *into(stacknode *top1,LQueue *Q); //初始化车辆进入

int expenses(stacknode *p,int x,int y); //停车费用计算函数

stacknode *leave(stacknode *top1,char str[],LQueue *Q); //车辆驶出出场函数

LQueue *InitLQue(); //初始化队列函数

LQueue *wait(LQueue *q,stacknode *s); //车辆进入候车便道函数

int EmptyLQue(LQueue *q); //判断候车便道有无等待车辆函数

stacknode *out(LQueue *q); //候车区车辆出队

stacknode *LQinto(stacknode *p,stacknode *top1); //从候车便道进入停车场函数

void show(stacknode *top1); //显示停车场所有信息函数

void T_shou(LQueue *Q); //显示候车区信息

/*函数部分*/

//主函数

void main()

{

char str[10];

Q=InitLQue();

top1=Init();

top2=Init();

Q=InitLQue();

int i;

printf("\t\t\t*************************************\n");

printf("\t\t\t\t 停车场管理系统\n");

printf("\t\t\t|| 1. 车辆进入停车场 ||\n");

printf("\t\t\t|| 2. 车辆离开停车场 ||\n");

printf("\t\t\t|| 3. 显示停车场内所有车辆信息 ||\n");

printf("\t\t\t|| 4. 显示候车区内所有车辆信息 ||\n");

printf("\t\t\t|| 5. 退出 ||\n");

printf("\t\t\t*************************************\n");

while(i!=5)

{

printf("\t请输入选项1-5:");

scanf("%d",&i);

switch(i)

{

case 1:

top1=into(top1,Q);

break;

case 2:

printf("请输入离开车辆的车牌号:");

scanf("%s",str);

top1=leave(top1,str,Q);

break;

case 3:show(top1);break;

case 4:T_shou(Q);break;

case 5:exit(1);

default:printf("输入错误,请重新输入1—5:");

break;

}

}

}

/*子函数*/

//初始化

stacknode *Init()

{

stacknode *top;

top=(stacknode *)malloc(sizeof(stacknode));

top=NULL;

return top;

}

//初始化车辆进入

stacknode *into(stacknode *top1,LQueue *Q)

{

stacknode *p,*q;

time_t rawtime; //调用系统时间函数

struct tm *timeinfo; //时间结点

time(&rawtime);

timeinfo=localtime(&rawtime);

p=(stacknode *)malloc(sizeof(stacknode));

if(p==NULL)

{

printf("内存分配失败");

return top1;

}

printf("请输入进入停车场车辆的车牌号:");

scanf("%s",p->data.num);

q=top1;

while(q!=NULL)

{

if(strcmp(p->data.num,q->data.num)==0)

{

printf("车牌号输入有误,该车已进入!");

return top1;

}

q=q->next;

}

p->data.time.day=timeinfo->tm_mday;

p->data.time.hour=timeinfo->tm_hour;

p->data.time.min=timeinfo->tm_min;

p->data.n=b;

if(b>max)

{

printf("停车场已满,请在便道等候!\n");

wait(Q,p);

return top1;

}

if(top1==NULL)

{

p->next=NULL;

top1=p;

}

else

{

p->next=top1;

top1=p;

}

b++;

printf("车辆进入停车场成功,时间已经自动载入!\n");

printf("车牌为%s的汽车驶入时间为:%d号%d点%d分\n",top1->data.num,top1->data.time.day,top1->data.time.hour,top1->data.time.min);

return top1;

}

//停车费用计算函数

int expenses(stacknode *p,int x1,int x2,int x3)

{

int w;

if(x3!=0)

w=(x1*24+x2+1-(p->data.time.day*24+p->data.time.hour))*price;

else

w=(x1*24+x2-(p->data.time.day*24+p->data.time.hour))*price;

return w;

}

//车辆驶出出场函数

stacknode *leave(stacknode *top1,char str[],LQueue *Q)

{

int i,day,hour,min;

time_t rawtime;

struct tm *timeinfo;

time(&rawtime);

timeinfo=localtime(&rawtime);

day=timeinfo->tm_mday;

hour=timeinfo->tm_hour;

min=timeinfo->tm_min;

stacknode *p,*q;

if(top1==NULL)

{

printf("停车场没有车辆!\n");

return top1;

}

q=(stacknode *)malloc(sizeof(stacknode));

if(p==NULL)

{

printf("内存分配失败");

return top1;

}

q=top1;

while(q!=NULL)

{

if(strcmp(q->data.num,str)==0)

break;

q=q->next;

}

if(q==NULL)

{

printf("输入有误,该车辆不在停车场!\n");

return top1;

}

for(i=top1->data.n;i>q->data.n;i--)

{

p=(stacknode *)malloc(sizeof(stacknode));

if(p==NULL)

{

printf("内存分配失败");

return top1;

}

strcpy(p->data.num,top1->data.num);

p->data.time=top1->data.time;

p->data.n=top1->data.n-1;

top1=top1->next;

if(top2==NULL)

{

p->next=NULL;

top2=p;

}

else

{

p->next=top2;

top2=p;

}

}

top1=top1->next;

while(top2!=NULL)

{

p=(stacknode *)malloc(sizeof(stacknode));if(p==NULL){printf("内存分配失败");return top1;}

p->data.n=top2->data.n;

strcpy(p->data.num,top2->data.num);

p->data.time=top2->data.time;

p->next=top1;

top1=p;

top2=top2->next;

}

if(EmptyLQue(Q))

{

p=out(Q);

p->data.n--;

top1=LQinto(p,top1);

}

else

b--;

printf("车牌为%s的汽车驶出时间为:%d号%d点%d分\n",q->data.num,day,hour,min);

printf("车辆驶出停车场需要缴纳的费用为:%d元\n",expenses(q,day,hour,min));

return top1;

}

//队列函数初始化

LQueue *InitLQue()

{

LQueue *Q;

stacknode *p;

Q=(LQueue *)malloc(sizeof(LQueue));

p=(stacknode *)malloc(sizeof(stacknode));

p->next=NULL;

Q->front=Q->rear=p;

return Q;

}

//候车区队列入队

LQueue *wait(LQueue *q,stacknode *s)

{

s->next=NULL;

q->rear->next=s;

q->rear=s;

return q;

}

//判断候车便道有无车辆等待

int EmptyLQue(LQueue *q)

{

if(q->front==q->rear)

return 0;

else

return 1;

}

//候车区车辆出队

stacknode *out(LQueue *q)

{

stacknode *p;

p=q->front->next;

if(q->front->next==q->rear)

{

q->rear=q->front;

return p;

}

else

q->front->next=p->next;

p->next=NULL;

return p;

}

//候车队列进入停车场

stacknode *LQinto(stacknode *p,stacknode *top1)

{

p->next=top1;

top1=p;

return top1;

}

//显示停车场内所有车辆信息

void show(stacknode *top1)

{

printf(" 停车场内全部车辆信息表\n");

if(top1==NULL)

printf(" 停车场内无车!\n");

else

{

printf("车牌号 进入时间 位置\n");

while(top1!=NULL)

{

printf(" %s %d号%d点%d分 第%d位\n",top1->data.num,top1->data.time.day,top1->data.time.hour,top1->data.time.min,top1->data.n);

top1=top1->next;

}

}

}

//显示候车区的汽车信息

void T_shou(LQueue *Q)

{

LQueue *q;

q=(LQueue *)malloc(sizeof(LQueue));

q->rear=Q->rear->next;

printf(" 候车区信息\n");

if(q->front==q->rear)

printf("候车区没有车辆!\n");

else

{

printf("车牌号 进入时间\n");

while(q!=NULL)

{

printf("%s %d号%d点%d分",q->data.num,q->data.time.day,q->data.time.hour,q->data.time.min);

q->rear=q->rear->next;

}

}

}

/*时间函数

int timef()

{

int x,y;

time_t rawtime;

struct tm *timeinfo;

time(&rawtime);

timeinfo=localtime(&rawtime);

x=timeinfo->tm_mday,y=timeinfo->tm_hour;

}

time_t rawtime;

struct tm *timeinfo;

time(&rawtime);

timeinfo=locoltime(&rawtime);

timeinfo->tm_ymday,*/

关于[(停车场管理系统c)停车场管理系统c语言]的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。

本文来自网络,不代表本站立场,转载请注明出处:http://ask.drzk.cn/tccxt/11662.html

作者: 道尔智控

道尔智控致力于智慧停车生态化建设,涵盖停车场管理系统、智慧停车系统、停车场系统、车牌识别 、门禁系统、道闸、通道闸、车位引导系统、云停车等。同时又为用户提供各种关于车牌、车型识别停车、停车场系统、通道道闸机等技术小知识,让您停车更智能、更简单、更便捷。
上一篇:(深圳云停车场)深圳市宝安免费停车场
下一篇:深圳智能高车视频,深圳智能高车科技发展
联系我们

联系我们

0898-88881688

在线咨询: QQ交谈

邮箱:drzk@drzk.cn

工作时间:周一至周五,9:00-17:30,节假日休息

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

关注微博
返回顶部