/**
 * Create a dictionary with integers as keys and their corresponding values as their squares,
 * within the given range. The range can be inclusive or exclusive based on the inclusive parameter.
 *
 * @param start The start value of the range.
 * @param end The end value of the range.
 * @param inclusive A flag indicating whether the range is inclusive (true) or exclusive (false).
 * @return A dictionary where the keys are integers within the given range and the values are the squares of the keys.
 */
fun createDictionaryWithRange(start: Int, end: Int, inclusive: Boolean): Map<Int, Int> {

    val result = mutableMapOf<Int, Int>()

    if (inclusive) {
        for (i in start..end) {
            result[i] = i * i
        }
    } else {
        for (i in start until end) {
            result[i] = i * i
        }
    }

    return result
}
/**
 * Create a dictionary with integers as keys and their corresponding values as their squares,
 * within the given range. The range can be inclusive or exclusive based on the inclusive parameter.
 *
 * @param start The start value of the range.
 * @param end The end value of the range.
 * @param inclusive A flag indicating whether the range is inclusive (true) or exclusive (false).
 * @return A dictionary where the keys are integers within the given range and the values are the squares of the keys.
 */
fun createDictionaryWithRange(start: Int, end: Int, inclusive: Boolean): Map<Int, Int> {
/**
 * Create a dictionary with integers as keys and their corresponding values as their squares,
 * within the given range. The range can be inclusive or exclusive based on the inclusive parameter.
 *
 * @param start The start value of the range.
 * @param end The end value of the range.
 * @param inclusive A flag indicating whether the range is inclusive (true) or exclusive (false).
 * @return A dictionary where the keys are integers within the given range and the values are the squares of the keys.
 */
fun createDictionaryWithRange(start: Int, end: Int, inclusive: Boolean): Map<Int, Int> {

    val result = mutableMapOf<Int, Int>()

    if (inclusive) {
        for (i in start..end) {
            result[i] = i * i
        }
    } else {
        for (i in start until end) {
            result[i] = i * i
        }
    }

    return result
}