/**
 * Write a function that counts the number of even numbers in a given range.
 *
 * @param start Starting value of the range (inclusive).
 * @param end Ending value of the range (exclusive).
 * @return Number of even numbers in the range.
 *
 * Example:
 * countEvenNumbers(1, 10) -> 4
 * countEvenNumbers(20, 51) -> 16
 */
fun countEvenNumbers(start: Int, end: Int): Int {

    var count = 0
    for (num in start until end) {
        if (num % 2 == 0) {
            count++
        }
    }
    return count
}
/**
 * Write a function that counts the number of even numbers in a given range.
 *
 * @param start Starting value of the range (inclusive).
 * @param end Ending value of the range (exclusive).
 * @return Number of even numbers in the range.
 *
 * Example:
 * countEvenNumbers(1, 10) -> 4
 * countEvenNumbers(20, 51) -> 16
 */
fun countEvenNumbers(start: Int, end: Int): Int {
/**
 * Write a function that counts the number of even numbers in a given range.
 *
 * @param start Starting value of the range (inclusive).
 * @param end Ending value of the range (exclusive).
 * @return Number of even numbers in the range.
 *
 * Example:
 * countEvenNumbers(1, 10) -> 4
 * countEvenNumbers(20, 51) -> 16
 */
fun countEvenNumbers(start: Int, end: Int): Int {

    var count = 0
    for (num in start until end) {
        if (num % 2 == 0) {
            count++
        }
    }
    return count
}