/**
 * Given a list of numbers and a threshold, find the maximum number that is smaller than the threshold.
 *
 * @param numbers A list of numbers.
 * @param threshold The threshold value.
 * @return The maximum number below the threshold, or null if no such number exists.
 */
fun findMaxBelowThreshold(numbers: List<Int>, threshold: Int): Int? {

    var maxNumber: Int? = null
    for (num in numbers) {
        if (num < threshold) {
            if (maxNumber == null || num > maxNumber!!) {
                maxNumber = num
            }
        }
    }
    return maxNumber
}
/**
 * Given a list of numbers and a threshold, find the maximum number that is smaller than the threshold.
 *
 * @param numbers A list of numbers.
 * @param threshold The threshold value.
 * @return The maximum number below the threshold, or null if no such number exists.
 */
fun findMaxBelowThreshold(numbers: List<Int>, threshold: Int): Int? {
/**
 * Given a list of numbers and a threshold, find the maximum number that is smaller than the threshold.
 *
 * @param numbers A list of numbers.
 * @param threshold The threshold value.
 * @return The maximum number below the threshold, or null if no such number exists.
 */
fun findMaxBelowThreshold(numbers: List<Int>, threshold: Int): Int? {

    var maxNumber: Int? = null
    for (num in numbers) {
        if (num < threshold) {
            if (maxNumber == null || num > maxNumber!!) {
                maxNumber = num
            }
        }
    }
    return maxNumber
}