📄 pex3_12.cpp
字号:
#include <iostream.h>
#pragma hdrstop
#include "wex3_12.h"
void main(void)
{
// customer service time varies from 5 to 10 minutes
Event tellerLine(5,10);
int serviceTime = 0;
// add the service times
for(int i=0;i < 10;i++)
serviceTime += tellerLine.GetEvent();
cout << "The teller services the 10 customers in "
<< serviceTime << " minutes." << endl;
}
/*
<Run>
The teller services the 10 customers in 67 minutes.
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -