Create a structure named apartment that contains data


Create a structure named Apartment that contains data fields to hold the number of bedrooms, the number of baths, and the monthly rent for the apartment. Write a program that creates an apartment object and prompts the user for a number of bedrooms and baths desired. Determine the rent from the following table and set the rent field appropriately. If a requested apartment type is not available, set the rent field to 0.

                              1 bath                 2 baths

1 bedroom             $650                  not available

2 bedrooms           $829                 $925

3 bedrooms          not available     $1075

Display all the data including an error message if the entered data is invalid, or if no apartments are available with the requested combination. Save the file as Apartment.cpp.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Create a structure named apartment that contains data
Reference No:- TGS02165276

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)