/**
 * A geographer wants to determine the direction of a specific coordinate on the Earth.
 * She needs to create a function that returns the direction based on the given latitude and longitude.
 * The function should use if statements as an alternative to the ternary operator.
 */
fun returnDirection(coordinate: Pair<Int, Int>): String {

    return when {
        coordinate.second > 0 -> {
            when {
                coordinate.first > 0 -> "Northeast"
                coordinate.first < 0 -> "Northwest"
                else -> "North"
            }
        }
        coordinate.second < 0 -> {
            when {
                coordinate.first > 0 -> "Southeast"
                coordinate.first < 0 -> "Southwest"
                else -> "South"
            }
        }
        else -> {
            when {
                coordinate.first > 0 -> "East"
                coordinate.first < 0 -> "West"
                else -> "Origin"
            }
        }
    }
}
/**
 * A geographer wants to determine the direction of a specific coordinate on the Earth.
 * She needs to create a function that returns the direction based on the given latitude and longitude.
 * The function should use if statements as an alternative to the ternary operator.
 */
fun returnDirection(coordinate: Pair<Int, Int>): String {
/**
 * A geographer wants to determine the direction of a specific coordinate on the Earth.
 * She needs to create a function that returns the direction based on the given latitude and longitude.
 * The function should use if statements as an alternative to the ternary operator.
 */
fun returnDirection(coordinate: Pair<Int, Int>): String {

    return when {
        coordinate.second > 0 -> {
            when {
                coordinate.first > 0 -> "Northeast"
                coordinate.first < 0 -> "Northwest"
                else -> "North"
            }
        }
        coordinate.second < 0 -> {
            when {
                coordinate.first > 0 -> "Southeast"
                coordinate.first < 0 -> "Southwest"
                else -> "South"
            }
        }
        else -> {
            when {
                coordinate.first > 0 -> "East"
                coordinate.first < 0 -> "West"
                else -> "Origin"
            }
        }
    }
}