/**
 * Given a start index and an end index, this function should count the number of even numbers between them (inclusive).
 *
 * @param start_index The starting index.
 * @param end_index The ending index.
 * @return The count of even numbers between start_index and end_index (inclusive).
 *
 * Example:
 * countEven(1, 10) -> 5
 * countEven(-5, 5) -> 6
 * countEven(15, 20) -> 3
 */
fun countEven(startIndex: Int, endIndex: Int): Int {

    var count = 0
    for (i in startIndex..endIndex) {
        if (i % 2 == 0) {
            count++
        }
    }
    return count
}
/**
 * Given a start index and an end index, this function should count the number of even numbers between them (inclusive).
 *
 * @param start_index The starting index.
 * @param end_index The ending index.
 * @return The count of even numbers between start_index and end_index (inclusive).
 *
 * Example:
 * countEven(1, 10) -> 5
 * countEven(-5, 5) -> 6
 * countEven(15, 20) -> 3
 */
fun countEven(startIndex: Int, endIndex: Int): Int {
/**
 * Given a start index and an end index, this function should count the number of even numbers between them (inclusive).
 *
 * @param start_index The starting index.
 * @param end_index The ending index.
 * @return The count of even numbers between start_index and end_index (inclusive).
 *
 * Example:
 * countEven(1, 10) -> 5
 * countEven(-5, 5) -> 6
 * countEven(15, 20) -> 3
 */
fun countEven(startIndex: Int, endIndex: Int): Int {

    var count = 0
    for (i in startIndex..endIndex) {
        if (i % 2 == 0) {
            count++
        }
    }
    return count
}