/**
 * A geographer is trying to calculate the distance between two cities.
 * Write a Kotlin code that will take two city names as input and print the distance between them.
 *
 * However, the geographer gets stuck in an infinite loop as he forgets to update the city names.
 * Your task is to modify the code inside the infinite loop so that it correctly calculates the distance
 * between the two cities without crashing the program.
 *
 * City names are case-insensitive.
 *
 * Hint: You may need to use an 'if statement' to break the loop conditionally.
 *
 * @param city1 String representing the name of the first city
 * @param city2 String representing the name of the second city
 */
fun printCityDistance(city1: String, city2: String) {

    var city1Distance = 0  // Variable to store the calculated distance for city1
    var city2Distance = 0  // Variable to store the calculated distance for city2

    // Infinite loop in need of modification
    while (true) {
        if (city1.equals(city2, ignoreCase = true)) {
            println("Both cities have the same name!")
            
            // Code to break the loop or perform an action to handle the same city names
            
        } else {
            // Code to calculate the distance between the two cities
        }
    }
}
/**
 * A geographer is trying to calculate the distance between two cities.
 * Write a Kotlin code that will take two city names as input and print the distance between them.
 *
 * However, the geographer gets stuck in an infinite loop as he forgets to update the city names.
 * Your task is to modify the code inside the infinite loop so that it correctly calculates the distance
 * between the two cities without crashing the program.
 *
 * City names are case-insensitive.
 *
 * Hint: You may need to use an 'if statement' to break the loop conditionally.
 *
 * @param city1 String representing the name of the first city
 * @param city2 String representing the name of the second city
 */
fun printCityDistance(city1: String, city2: String) {
/**
 * A geographer is trying to calculate the distance between two cities.
 * Write a Kotlin code that will take two city names as input and print the distance between them.
 *
 * However, the geographer gets stuck in an infinite loop as he forgets to update the city names.
 * Your task is to modify the code inside the infinite loop so that it correctly calculates the distance
 * between the two cities without crashing the program.
 *
 * City names are case-insensitive.
 *
 * Hint: You may need to use an 'if statement' to break the loop conditionally.
 *
 * @param city1 String representing the name of the first city
 * @param city2 String representing the name of the second city
 */
fun printCityDistance(city1: String, city2: String) {

    var city1Distance = 0  // Variable to store the calculated distance for city1
    var city2Distance = 0  // Variable to store the calculated distance for city2

    // Infinite loop in need of modification
    while (true) {
        if (city1.equals(city2, ignoreCase = true)) {
            println("Both cities have the same name!")
            
            // Code to break the loop or perform an action to handle the same city names
            
        } else {
            // Code to calculate the distance between the two cities
        }
    }
}