A supermarket wants to test how well their store will function with different number of cashiers serving customers. Write a program that simulates that situation using queues. First, your program should ask how many cashiers will be serving customers. You should make sure that the number entered is between 1 and 5. For each simulated minute you should generate a random number of buyers (between 0 and 3), each buyer takes from 2 to 6 minutes to be served (generate the number of service minutes randomly). Customers are served on a first-come first serve basis. A customer will stay with a cashier until the time required has elapsed, then the cashier can serve the next customer. The simulation ends when no cashiers are busy and no people enter the store.
how to generate a random number in c++ ?
|
Team Leader
|
![]() |
| 2Jan2008,12:39 | #2 |
|
Code: CPP
|

