Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The current selected programming language is Python. We emphasize the submission of a fully working code over partially correct but efficient code. Use of certain

image text in transcribed

The current selected programming language is Python. We emphasize the submission of a fully working code over partially correct but efficient code. Use of certain header files is restricted. Once submitted, you cannot review this problem again. You can use print to debug your code. The print may not work in case of syntax/runtime error. The version of Python being used is 2.7. An architect is in charge of designing the layout of a commercial building. Triangular trusses will support the rooftop of the building. For better support of the rooftop, the architect must choose trusses with the largest area from the available stock. The trusses are triangular frameworks whose area is given by the formula: Area of a triangle =( base e height )/2. Write an algorithm to help the architect find the area of the largest trusses. Input The first line of the input consists of two space-separated positive integers - b1,hi, representing the base and height of the first trusses. The second line consists of two spaceseparated positive integers b2,h2, representing the base and height of the secord trusses. Output Print a real number representing the area of the largest trusses rounded up to 6 decimal places. Constraints 0b1,h1,b2,h2109 Example Input: (4 5 610 Dutput 30.000000 Explanatiom Area of the first triangle = 10.000000 ((45)/2). Area of the second triangle = 30.0000004(6210)/2) So, the output is 22.000000

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions