/**
 * Given two numbers x and y, and a boolean condition,
 * return the product of x and y if the condition is true,
 * otherwise return the difference between x and y.
 *
 * @param x The first number.
 * @param y The second number.
 * @param condition The boolean condition.
 * @return The product of x and y if the condition is true,
 *         otherwise the difference between x and y.
 */
fun calculateProduct(x: Int, y: Int, condition: Boolean): Int {

    val result = if (condition) x * y else x - y
    return result
}
/**
 * Given two numbers x and y, and a boolean condition,
 * return the product of x and y if the condition is true,
 * otherwise return the difference between x and y.
 *
 * @param x The first number.
 * @param y The second number.
 * @param condition The boolean condition.
 * @return The product of x and y if the condition is true,
 *         otherwise the difference between x and y.
 */
fun calculateProduct(x: Int, y: Int, condition: Boolean): Int {
/**
 * Given two numbers x and y, and a boolean condition,
 * return the product of x and y if the condition is true,
 * otherwise return the difference between x and y.
 *
 * @param x The first number.
 * @param y The second number.
 * @param condition The boolean condition.
 * @return The product of x and y if the condition is true,
 *         otherwise the difference between x and y.
 */
fun calculateProduct(x: Int, y: Int, condition: Boolean): Int {

    val result = if (condition) x * y else x - y
    return result
}