Set Values To Array Starting At [0][0]

Hello,
How would I go about placing values into a 2d array with these rules
for array[13][6]
[1] Type 1 = Rows 1 and 2
[2] Type 2 = Rows 3 through 7
[3] Type 3 = Rows 8 through 13

So a user would enter a choice from the above types (1,2,3)
And based on the type, a user defined value should be placed in chronological order for each row. And when all rows for a particular type are filled, display a warning message. And if the seat is not taken, place the user defined value in that location, and display the row and column where the value is.

Any help with this would be appreciated :)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
int array[13][6];

if (type == 1)
    for (int i = 0; i < 2; i++)
        for (int j = 0; j < 6; j++)
            cin >> array[i][j];
else if (type ==2)
    for (int i = 2; i < 7; i++)
        for (int j = 0; j < 6; j++)
            cin >> array[i][j];
else if (type ==3)
    for (int i = 7; i < 13; i++)
        for (int j = 0; j < 6; j++)
            cin >> array[i][j];
That's a great and informative and topic . I like and saved...Thanks
Thank you Stewbond, your idea was a major success!
Topic archived. No new replies allowed.