当前位置: 代码迷 >> C语言 >> 停车场问题(清华版数据结构实验题)
  详细解决方案

停车场问题(清华版数据结构实验题)

热度:591   发布时间:2005-09-30 16:04:00.0
停车场问题(清华版数据结构实验题)
由于以前发的代码有被同班同学原版复制后交上以致出现实验报告雷同的情况,这个实验只给出了头部,NCWU 2003 级 电信专业 的同学有需要的可以和QQ:253968497联系获取全部代码
main()
{struct car{
   int inf;
   int num;
   int time;
   struct car *next;
  };
int m,n=0,j=0,time1;
int max=3;
struct car *p1,*p2;
struct car *front,*rear;
struct car *top1,*base1;
struct car *top2,*base2;
for(m=0;m<5;m++)
printf("\n");
for(m=0;m<20;m++)
printf(" ");
printf("thank you for using this system\n");
p1=(struct car*)malloc(sizeof(struct car));
top1=base1=(struct car*)malloc(3*sizeof(struct car));
top2=base2=(struct car*)malloc(sizeof(struct car));
front=rear=(struct car*)malloc(sizeof(struct car));
printf("input the information of this car:Arrival(01),Department(10),End(00)");
scanf("%d",&p1->inf);
if(p1->inf==00)
   {
    printf("\n");
    printf("thank you for using this system again,if you find faults in this program,you can contact with QQ:253968497 and tell he\n");
   }
else
{ printf("input the num of this car:");
   scanf("%d",&p1->num);
   printf("input the time of this car:");
   scanf("%d",&p1->time);
}

[此贴子已经被作者于2005-9-30 16:07:57编辑过]


搜索更多相关的解决方案: 清华  数据结构  car  int  停车场  

----------------解决方案--------------------------------------------------------
  相关解决方案