📄 sy5.cpp
字号:
#include<iostream.h>
#include<iomanip.h>
#include<stdlib.h>
#include<process.h>
#include<string.h>
#include "sy5.h"
void main()
{
int t=0,u;
cout<<"*****************预测理发馆的经营情况******************"<<endl;
cout<<"-------------------------------------------------------"<<endl;
cout<<" > ------ 1. 服务"<<" > ------ 2. 退出"<<endl;
cout<<"*******************************************************"<<endl;
H1: cout<<">> 请选择要执行的操作: ";
cin>>u;
switch(u)
{
case 1:
OpenForDay();
break;
case 2:
cout<<"退出 "<<endl;
exit(0);
}
while(!ListEmpty(ev))
{
DelFirst(ev,en);
if(en.NType==0) CustomerArrived();
else CustomerDeparture();
}
cout<<"顾客人数: "<<CustomerNum<<endl;
cout<<"平均逗留时间: "<<setprecision(3)<<Totaltime/CustomerNum<<endl;
cout<<"平均队长: "<<Totallength/CustomerNum<<endl;
cout<<"服务收费: "<<y<<endl;
t=(t1>=t2)?t1:t2;
cout<<"关门后工作时间: "<<t-CloseTime<<endl;
cout<<endl<<"< --1.服务 "<<"2. 退出 >"<<endl;
cout<<endl;
goto H1;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -