The length of a rectangle is stored in a double variable named length, the width in one named width.

The length of a rectangle is stored in a double variable named length, the width in one named width.

LANGUAGE: Visual Basic

CHALLENGE:

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.

SOLUTION:

Math.Sqrt(length^2 + width^2) 

Add comment