/**
 * Given the width and height of a rectangular board and an angle in degrees, calculate the length of the board required by the carpenter.
 * The angle represents the slope of the board in the coordinate plane, where the positive x-axis points right and the positive y-axis points up.
 *
 * @param width The width of the board.
 * @param height The height of the board.
 * @param angle The angle in degrees.
 * @return The length of the board required by the carpenter.
 *
 * Example:
 * calculateBoardLength(6.5, 8.2, 35)
 * Output: 10.928656096210983
 */
fun calculateBoardLength(width: Double, height: Double, angle: Int): Double {

    val radians = angle * Math.PI / 180
    val slope = Math.tan(radians)
    val length = Math.sqrt((width * width) + (height * height) + (2 * width * height * slope))
    return length
}
/**
 * Given the width and height of a rectangular board and an angle in degrees, calculate the length of the board required by the carpenter.
 * The angle represents the slope of the board in the coordinate plane, where the positive x-axis points right and the positive y-axis points up.
 *
 * @param width The width of the board.
 * @param height The height of the board.
 * @param angle The angle in degrees.
 * @return The length of the board required by the carpenter.
 *
 * Example:
 * calculateBoardLength(6.5, 8.2, 35)
 * Output: 10.928656096210983
 */
fun calculateBoardLength(width: Double, height: Double, angle: Int): Double {
/**
 * Given the width and height of a rectangular board and an angle in degrees, calculate the length of the board required by the carpenter.
 * The angle represents the slope of the board in the coordinate plane, where the positive x-axis points right and the positive y-axis points up.
 *
 * @param width The width of the board.
 * @param height The height of the board.
 * @param angle The angle in degrees.
 * @return The length of the board required by the carpenter.
 *
 * Example:
 * calculateBoardLength(6.5, 8.2, 35)
 * Output: 10.928656096210983
 */
fun calculateBoardLength(width: Double, height: Double, angle: Int): Double {

    val radians = angle * Math.PI / 180
    val slope = Math.tan(radians)
    val length = Math.sqrt((width * width) + (height * height) + (2 * width * height * slope))
    return length
}