#include // Additional libraries here // Provided constants #define TRUE 1 #define FALSE 0 #define TOTAL_FLOOR

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

#include // Additional libraries here // Provided constants #define TRUE 1 #define FALSE 0 #define TOTAL_FLOOR

Post by answerhappygod »

#include <stdio.h>
// Additional libraries here
// Provided constants#define TRUE 1#define FALSE 0
#define TOTAL_FLOORS 8#define ROOMS_PER_FLOOR 8#define INITIAL_PRICE 10#define NO_BOOKING -1
// Your constants here
// Provided structstruct room { int booking_id; int price;};
// Provided functions use for game setup// You do not need to use these functions yourself.void init_hotel(struct roomhotel[TOTAL_FLOORS][ROOMS_PER_FLOOR]);
// You will need to use these functions for stage 1.void print_hotel(struct roomhotel[TOTAL_FLOORS][ROOMS_PER_FLOOR]);void print_hotel_with_prices(struct roomhotel[TOTAL_FLOORS][ROOMS_PER_FLOOR]);
// Your function prototypes here:
int main(void) { struct room hotel[TOTAL_FLOORS][ROOMS_PER_FLOOR] ={0}; init_hotel(hotel);
printf("Welcome to the CS Hotel!!\n\n"); // TODO: Add your setup phase
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply