Computer Science Homework Solutions
Problem
#172228

Write a program that prompts for the number of rooms in a house.

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"

Solution
What is this?
By OTA - Overall OTA Rating
Yupei Xiong, PhD - 4.8/5
Purchase Cost Now
$2.19 CAD (was ~$19.95)
Included in Download
  • Plain text response
  • Attached file(s):
    • 172228.cpp
    • 172228.doc
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
Browse