pex3_12.cpp
来自「数据结构C++代码,经典代码,受益多多,希望大家多多支持」· C++ 代码 · 共 25 行
CPP
25 行
#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 + =
减小字号Ctrl + -
显示快捷键?