View the step-by-step solution to:

Write a program that prompts for the number of rooms in a house. Use the input, n, to declare an array of rectangles dynamically.

Write a program that prompts for the number of rooms in a house. Use the input, n, to declare an array of rectangles dynamically. In a loop, input the dimensions for the n rooms, and then output the total area of the house. Scan the array to identify the room with the largest perimeter, and output its dimensions.
This program prompts the user for a number of rooms in a house.
creates dynamically an array of rectangles to hold the dimensions of each room.  
calculates and output the total area of the house
identifies the room with the largest perimeter and output it's dimensions.
the main file to use is:
#include "d_rect.h"

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question