/**
 * This exercise aims to check if three given side lengths can form a triangle or not.
 * A triangle is formed if and only if the sum of the two smaller sides is greater than the largest side.
 * Your task is to complete the code by adding nested if statements to check if the sides can form a triangle or not.
 *
 * @param side1 Length of the first side of the triangle.
 * @param side2 Length of the second side of the triangle.
 * @param side3 Length of the third side of the triangle.
 * @return A string indicating whether the sides form a triangle or not. Return "Triangle formed!" if it is a triangle,
 * otherwise return "Not a triangle!".
 */
fun checkTriangle(side1: Int, side2: Int, side3: Int): String {

    if (side1 > (side2 + side3)) {
        return "Not a triangle!"
    } else if (side2 > (side1 + side3)) {
        return "Not a triangle!"
    } else if (side3 > (side1 + side2)) {
        return "Not a triangle!"
    } else {
        return "Triangle formed!"
    }
}
/**
 * This exercise aims to check if three given side lengths can form a triangle or not.
 * A triangle is formed if and only if the sum of the two smaller sides is greater than the largest side.
 * Your task is to complete the code by adding nested if statements to check if the sides can form a triangle or not.
 *
 * @param side1 Length of the first side of the triangle.
 * @param side2 Length of the second side of the triangle.
 * @param side3 Length of the third side of the triangle.
 * @return A string indicating whether the sides form a triangle or not. Return "Triangle formed!" if it is a triangle,
 * otherwise return "Not a triangle!".
 */
fun checkTriangle(side1: Int, side2: Int, side3: Int): String {
/**
 * This exercise aims to check if three given side lengths can form a triangle or not.
 * A triangle is formed if and only if the sum of the two smaller sides is greater than the largest side.
 * Your task is to complete the code by adding nested if statements to check if the sides can form a triangle or not.
 *
 * @param side1 Length of the first side of the triangle.
 * @param side2 Length of the second side of the triangle.
 * @param side3 Length of the third side of the triangle.
 * @return A string indicating whether the sides form a triangle or not. Return "Triangle formed!" if it is a triangle,
 * otherwise return "Not a triangle!".
 */
fun checkTriangle(side1: Int, side2: Int, side3: Int): String {

    if (side1 > (side2 + side3)) {
        return "Not a triangle!"
    } else if (side2 > (side1 + side3)) {
        return "Not a triangle!"
    } else if (side3 > (side1 + side2)) {
        return "Not a triangle!"
    } else {
        return "Triangle formed!"
    }
}