电梯模拟课程设计实验报告
return 0; }
int e3()//楼梯外的队列入栈 { while(!s[nowfloor].QueueEmpty()&&renshu<MAXMAN) { n=s[nowfloor].DeQueue(); wait(25); n.inel(); renshu++; } return 0; }
int e6()//电梯上升 { cout<<clock()/TIME-delay/TIME<<","<<nexttime/TIME<<":"<<"电梯正在上升中 "<<endl; wait(30); callcar[nowfloor]=0; nowfloor++; callup[nowfloor-1]=0; cout<<clock()/TIME-delay/TIME<<","<<nexttime/TIME<<":"<<"电梯上升到了第"<<nowfloor<<"层"<<endl; callcar[nowfloor]=0; f=1; return 0; }
int e7()//电梯下降 { cout<<clock()/TIME-delay/TIME<<","<<nexttime/TIME<<":"<<"电梯正在下降中 "<<endl; wait(30); callcar[nowfloor]=0; nowfloor--; calldown[nowfloor+1]=0; cout<<clock()/TIME-delay/TIME<<","<<nexttime/TIME<<":"<<"电梯下降到了第"<<nowfloor<<"层"<<endl; f=1; callcar[nowfloor]=0; return 0; }
int e8()//静止 { cout<<clock()/TIME-delay/TIME<<","<<nexttime/TIME<<":"<<"电梯静止,现在的楼层是:"<<nowfloor<<endl;
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库数据结构课程设计_电梯模拟(15)在线全文阅读。
相关推荐: