Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help me make a start Please

Status
Not open for further replies.

tapitin

Programmer
Jun 5, 2000
1
GB
I am new to C' programming and am learning via tutorials I have come across a question I dont understand or even know where to begin (excuse my ignorance) I would like dvice as to where to start and how to go about solving the problem. Any tipls or pointers most welcome ok hare it is The rand() function is used to generate pseudo-randam values. Write a program that uses the function to simulate pople standing in a cue. The probability of someone arriving or departing the cue is 1 in 30 per second a call to the function rand() % 20 == 0 can be used to determine is an arrival has occured Another call to that function can be made to see if a separture has occured. Write a program to keep a record of the number of people in the que every second and printing the que length every minute. Use loops to simulate the number of minutes and the number of seconds. The program should run for 20 minutes cheeras! nick <A HREF="mailto:nick@themadhouse.greatxscape.net">nick@themadhouse.greatxscape.net</A>
 
Do you need whole Logic ? <p>Siddhartha Singh<br><a href=mailto:siddhu_singh@hotmail.com>siddhu_singh@hotmail.com</a><br><a href=siddhu.freehosting.net> </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top