Question: Write a C++ program that inputs the length and width of two rectangles (in integers) representing a house and a garage. Write a function

 Write a C++ program that inputs the length and width of two rectangles (in integers) representing a house and 

Write a C++ program that inputs the length and width of two rectangles (in integers) representing a house and a garage. Write a function that uses Call-by- Value int rectArea (int len, int wid) that returns the area of a rectangle with length len and width wid. Divide the area of the garage by the area of the house and multiply by 100 to determine the percentage (int). Enter your name as a Global variable and all other variables should be local variables in main or rectArea. Area = length*width Percentage = 100* GarageArea/HouseArea Sample Input Length of House (ft): 50 Width of House (ft): 60 Length of Garage (ft): 10 Width of Garage (ft):20

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The assignment requires writing a C program that consists of a function rectArea to calculate the ar... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!