In order to estimate the cost of painting a house, a painter needs to know the surface area of the exterior. Develop an algorithm for computing that value. Your inputs are the width, length, and height of the house, the number of windows and doors, and their dimensions. (Assume the windows and doors have a uniform size.)

Respuesta :

Algorithms are used as prototypes for a complete program.

The algorithm to print the surface area of the exterior is as follows:

1. Start

2. Input the number of windows (n1)

3. Input the number of doors (n2)

4. Input the Length and Width of the windows (L1, W1)

5. Input the Length and Width of the doors (L2, W2)

6. Input Length, Width and Height of the Building

7. Calculate the area of the all windows: Area1 = n1 * L1 * W1

8. Calculate the area of the all doors: Area2 = n2 * L2 * W2

9. Calculate the surface area of the building: Area = 2 * (Length * Width + Length * Height + Width * Height)

10. Calculate the surface area of the exterior. Exterior = Area - Area1 - Area2

11. Display the surface area that can be painted; Exterior

12. Stop

The algorithm is self-explanatory, as all 12 lines of the algorithm are in plain English language.

The surface area of the exterior is calculated by subtracting the areas of all doors and windows from the surface area of the building.

Read more about algorithms at:

https://brainly.com/question/24568182