Could someone help me out on this problem in C.
The rand() fuction is used to genetrate pseudo-random values.Can you write a program that uses the function to simulate people standing in a queue.The probability of someone arriving or departing the queue is 1 in 30 per second.The following function call can be usedto determin if an arrival has occurred.
rand() % 30 == 0
Another call function can be made to see if a departure has occured.
write a program to keep record of the number of people in the queue every second and printing the leghth of queue length each minute.Use loops to simulate the number of minutes and the number of seconds.The program should run for 20 mins.
I will learn from this its not a cheating thing i need help please Don't Know where to Start.
Thanks