9(a)Two Dimensional ArraysEasy2 marks
A hotel has three floors numbered 0 to 2 (floor 0 is the ground floor). There are 15 rooms on each floor.
The hotel gets many enquiries from customers to check if a room is available that day.
The availability data for that day is stored in a 2D array Version1
- The first index is the floor number.
- The second index is the room number.
- On each of the three floors, the room numbers are 1 to 15.
Each cell of the array stores either:
- 'A' – the room is available
- 'B' – the room is already booked.
Write the declaration statement for the 2D array Version1