/**
 * Write a function that takes in a list of numbers and a threshold value.
 * The function should return the count of numbers in the list that are greater than or equal to the threshold.
 *
 * @param numbers A list of numbers.
 * @param threshold A threshold value to compare the numbers with.
 * @return The count of numbers greater than or equal to the threshold.
 *
 * Example:
 * countHighValues(listOf(1, 5, 10, 15), 10)
 * Output: 2
 *
 * Note:
 * - The count should include both numbers that are exactly equal to the threshold and numbers that are greater than the threshold.
 * - The numbers in the list can be positive, negative, or zero.
 * - The list may also contain non-numeric elements, which should be ignored for the comparison.
 */
fun countHighValues(numbers: List<Number>, threshold: Number): Int {

    var count = 0
    for (num in numbers) {
        if (num is Int || num is Double || num is Float || num is Long) {
            if (num.toDouble() >= threshold.toDouble()) {
                count++
            }
        }
    }
    return count
}
/**
 * Write a function that takes in a list of numbers and a threshold value.
 * The function should return the count of numbers in the list that are greater than or equal to the threshold.
 *
 * @param numbers A list of numbers.
 * @param threshold A threshold value to compare the numbers with.
 * @return The count of numbers greater than or equal to the threshold.
 *
 * Example:
 * countHighValues(listOf(1, 5, 10, 15), 10)
 * Output: 2
 *
 * Note:
 * - The count should include both numbers that are exactly equal to the threshold and numbers that are greater than the threshold.
 * - The numbers in the list can be positive, negative, or zero.
 * - The list may also contain non-numeric elements, which should be ignored for the comparison.
 */
fun countHighValues(numbers: List<Number>, threshold: Number): Int {
/**
 * Write a function that takes in a list of numbers and a threshold value.
 * The function should return the count of numbers in the list that are greater than or equal to the threshold.
 *
 * @param numbers A list of numbers.
 * @param threshold A threshold value to compare the numbers with.
 * @return The count of numbers greater than or equal to the threshold.
 *
 * Example:
 * countHighValues(listOf(1, 5, 10, 15), 10)
 * Output: 2
 *
 * Note:
 * - The count should include both numbers that are exactly equal to the threshold and numbers that are greater than the threshold.
 * - The numbers in the list can be positive, negative, or zero.
 * - The list may also contain non-numeric elements, which should be ignored for the comparison.
 */
fun countHighValues(numbers: List<Number>, threshold: Number): Int {

    var count = 0
    for (num in numbers) {
        if (num is Int || num is Double || num is Float || num is Long) {
            if (num.toDouble() >= threshold.toDouble()) {
                count++
            }
        }
    }
    return count
}