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
Business Economics: Create a structure named apartment that contains data
Reference No:- TGS02157742

Now Priced at $10 (50% Discount)

Recommended (90%)

Rated (4.3/5)