Respuesta :

Answer:

The following are the algorithm to this question:

Explanation:

Following are the steps of the algorithm:

step 1:

To calculate the area of the room, firstly we need to divide the given image into parts and calculate the area of the given image.

step 2:

After calculating each part area, we merge all the parts to calculate the areas.

Calculating area of the parts:

In part 1:

It forms the square shape, and the formula of the square is [tex]side \times side[/tex].   In this diagram we let A=B. that's why the area is [tex]b^2[/tex].

In part 2:

In this part also forms the square image.  In this, the side is equal to (A-c). so, the area is equal to [tex](A-C)^2[/tex].

In part 3:

It forms the triangle shape, and the area of the triangle is[tex]= \frac{b \times h}{2}[/tex]. the value of "b" is E and the "h" is = (A-C). so, the area is [tex]= \frac{E\times (A-C)}{2}[/tex].  

The total area is:

[tex]\bold{ =b^2+(A-C)^2+ \frac{E\times (A-C)}{2}}[/tex]

Ver imagen codiepienagoya

The algorithm that outlines how to calculate the room area is as follows:

  1. Start
  2. Input A, B, C, D, E
  3. AreaRectangle1 = A x B
  4. AreaRectangle2 = (A - C) x (D - C - E)
  5. AreaTriangle1 = 0.5 x E x (A -C)
  6. Total = AreaRectangle1 + AreaRectangle2 + AreaTriangle1
  7. Print Total
  8. Stop

From the attached figure, we can see that the figure has been split to 3

  1. A rectangle with the dimension; A by B
  2. A rectangle with the dimension: (A - C) by (D - C - E)
  3. A triangle with the dimension base E and height (A - C).

So, the algorithm is as follows:

  1. Start ---- > This begins the algorithm
  2. Input A, B, C, D, E ---- > This gets input for the sides of the shape
  3. AreaRectangle1 = A x B ----> This calculates the area of the first rectangle
  4. AreaRectangle2 = (A - C) x (D - C - E) ----> This calculates the area of the second rectangle
  5. AreaTriangle1 = 0.5 x E x (A -C) ---> This calculates the area of the triangle
  6. Total = AreaRectangle1 + AreaRectangle2 + AreaTriangle1 -----> This adds up the 3 areas to get the total area of the shape
  7. Print Total ----> This prints the calculated area
  8. Stop -----> This ends the algorithm

Read more about algorithms at:

https://brainly.com/question/17780739

ACCESS MORE
EDU ACCESS