Computer Science, asked by prajapatipiya75, 1 month ago

write a program in java to calculate the diagonal of a rectangle where Length=20, breadth=10​

Answers

Answered by lambavansh836
0

Answer:

input length x

input breath y

Answered by nikhil9843
0

Answer:

In general, the length of the diagonal (d) of a right rectangular prism (a rectangular box) with length (l), width (w), and height (h) is given by the following 3-dimensional form of the pythagorean theorem:

d2 = l2 + w2 + h2

To solve for d, take the square root of both sides of this equation:

√(d2) = √(l2 + w2 + h2)

d = √(l2 + w2 + h2)

Since the rectangular box in question has the dimensions 6 cm x 8 cm x 10 cm, then the length of the diagonal is as follows:

d = √(62 + 82 + 102)

d = √(36 + 64 + 100)

d = √(200)

d = √(100)·√(2)

d = 10√(2)

Therefore, the length of the diagonal of this rectangular box is 10√2 cm.

Similar questions