电梯模拟课程设计实验报告
cout<<"now,next-------------------------------------------------"<<endl;; return 0; }
int subsr()//输入函数的子函数 { cout<<"请输入乘客进入了哪层,要去哪层,容忍等待的最大时间,下一乘客到来的时间间隔:\n"; if(tf==0) times();//保存时间状态 tf=1; while(cin>>m.infloor>>m.outfloor>>m.giveuptime>>lt) { if(m.infloor==0&&m.outfloor==0&&m.giveuptime==0&<==0) { int nowdelay; nowdelay=delay; cout<<""<<endl; diantizhuangtai(); subsr(); } if(m.infloor>=5||m.outfloor>=5||m.infloor==m.outfloor) { cout<<clock()/TIME-delay/TIME<<","<<nexttime/TIME<<":"<<"输入楼层错误!请重新输入"<<endl; continue; } else break; } if(tf!=0) timer();//恢复时间状态 tf=0; return 0; }
int shuru()//输入函数