$${{\mathtt{c}}}^{{\mathtt{2}}} = {{\mathtt{a}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{b}}}^{{\mathtt{2}}} \Rightarrow \left\{ \begin{array}{l}{\mathtt{c}} = {\mathtt{\,-\,}}{\sqrt{{{\mathtt{b}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{a}}}^{{\mathtt{2}}}}}\\
{\mathtt{c}} = {\sqrt{{{\mathtt{b}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{a}}}^{{\mathtt{2}}}}}\\
\end{array} \right\}$$
I assume you want to find the length of the diagonal of the rectangular roof. This is done using Pythagoras's theorem with a = 40, b = 20. So c, the length of the diagonal is:
$${\mathtt{c}} = {\sqrt{{{\mathtt{40}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{20}}}^{{\mathtt{2}}}}} \Rightarrow {\mathtt{c}} = {\mathtt{44.721\: \!359\: \!549\: \!995\: \!793\: \!9}}$$
or c ≈ 44.7 feet
.
I assume you want to find the length of the diagonal of the rectangular roof. This is done using Pythagoras's theorem with a = 40, b = 20. So c, the length of the diagonal is:
$${\mathtt{c}} = {\sqrt{{{\mathtt{40}}}^{{\mathtt{2}}}{\mathtt{\,\small\textbf+\,}}{{\mathtt{20}}}^{{\mathtt{2}}}}} \Rightarrow {\mathtt{c}} = {\mathtt{44.721\: \!359\: \!549\: \!995\: \!793\: \!9}}$$
or c ≈ 44.7 feet
.