129k views
4 votes
The length of a rectangle is stored in a double variable named length, the width in one named width. Write an expression whose value is the length of the diagonal of the rectangle.The length of a rectangle is stored in a double variable named length, the width in one named width. Write an expression whose value is the length of the diagonal of the rectangle.

User Jabongg
by
7.9k points

1 Answer

4 votes

Answer:

Answered

Explanation:

Length is stored in variable named length

the width in one named width

the expression for the diagonal of the rectangle can be written as

double diagonal = Math.sqrt(Math.pow(length,2) + Math.pow(width,2))

User Rickvdbosch
by
8.7k points

No related questions found