/**
 * This function takes a list of numerical data and a threshold value as input.
 * It counts and returns the number of elements in the data list that are greater
 * than the threshold value.
 *
 * @param data A list of numerical data.
 * @param threshold A numerical value to compare with the elements of the data list.
 * @return An integer representing the number of elements greater than the threshold.
 *
 * Example:
 * val data = listOf(2, 4, 6, 8, 10)
 * val threshold = 5
 * countHigherThanThreshold(data, threshold) will return 3, as there are 3 elements (6, 8, and 10)
 * greater than the threshold value (5).
 */
fun countHigherThanThreshold(data: List<Int>, threshold: Int): Int {

    var count = 0

    for (element in data) {
        if (element > threshold) {
            count++
        }
    }

    return count
}
/**
 * This function takes a list of numerical data and a threshold value as input.
 * It counts and returns the number of elements in the data list that are greater
 * than the threshold value.
 *
 * @param data A list of numerical data.
 * @param threshold A numerical value to compare with the elements of the data list.
 * @return An integer representing the number of elements greater than the threshold.
 *
 * Example:
 * val data = listOf(2, 4, 6, 8, 10)
 * val threshold = 5
 * countHigherThanThreshold(data, threshold) will return 3, as there are 3 elements (6, 8, and 10)
 * greater than the threshold value (5).
 */
fun countHigherThanThreshold(data: List<Int>, threshold: Int): Int {
/**
 * This function takes a list of numerical data and a threshold value as input.
 * It counts and returns the number of elements in the data list that are greater
 * than the threshold value.
 *
 * @param data A list of numerical data.
 * @param threshold A numerical value to compare with the elements of the data list.
 * @return An integer representing the number of elements greater than the threshold.
 *
 * Example:
 * val data = listOf(2, 4, 6, 8, 10)
 * val threshold = 5
 * countHigherThanThreshold(data, threshold) will return 3, as there are 3 elements (6, 8, and 10)
 * greater than the threshold value (5).
 */
fun countHigherThanThreshold(data: List<Int>, threshold: Int): Int {

    var count = 0

    for (element in data) {
        if (element > threshold) {
            count++
        }
    }

    return count
}