just got assigned a problem dealing with assigning random "seats" to a 2D array that is supposed to represent the seating chart of an airplane. I'm supposed to assign seats at random to 20 people in this 2D array.
Here's the exact question copy and pasted:
1. For the Airplane seating problem, you can think of it as having a 2D array, say 2 by 10. Now assign seats the following people at random (i.e. random row and column)
Alice 24,
Bob 30,
Cat 44,
David, 12
Eric 18
Fred 67
Greg 44
Helen 79
Ike 3
John 33
Kevin 21
Lucy 17
Mary 29
Nancy 41
Oliver 24
Peter 54
Queen 43
Rose 37
Steve 30
Tim 19
mcleano: how do you assign limits to the rand() and srand() functions? I'm completely a beginner with programming so sorry if my questions are very elementary.