#include
#include
#include
#include
#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******************