/**
 * Given the athlete's daily running distance and their target distance, calculate the remaining distance that
 * the athlete needs to cover. The function should return the remaining distance after each day of running.
 *
 * @param runDistance The distance run by the athlete on each day
 * @param targetDistance The target distance the athlete aims to achieve
 * @return The remaining distance that needs to be covered
 *
 * Example:
 * calculateDailyDistance(8.0, 100.0) -> 92.0
 * calculateDailyDistance(12.0, 120.0) -> 108.0
 * calculateDailyDistance(7.0, 70.0) -> 63.0
 */
fun calculateDailyDistance(runDistance: Double, targetDistance: Double): Double {

    var remainingDistance = targetDistance
    while (remainingDistance > 0) {
        remainingDistance -= runDistance
    }
    return remainingDistance
}
/**
 * Given the athlete's daily running distance and their target distance, calculate the remaining distance that
 * the athlete needs to cover. The function should return the remaining distance after each day of running.
 *
 * @param runDistance The distance run by the athlete on each day
 * @param targetDistance The target distance the athlete aims to achieve
 * @return The remaining distance that needs to be covered
 *
 * Example:
 * calculateDailyDistance(8.0, 100.0) -> 92.0
 * calculateDailyDistance(12.0, 120.0) -> 108.0
 * calculateDailyDistance(7.0, 70.0) -> 63.0
 */
fun calculateDailyDistance(runDistance: Double, targetDistance: Double): Double {
/**
 * Given the athlete's daily running distance and their target distance, calculate the remaining distance that
 * the athlete needs to cover. The function should return the remaining distance after each day of running.
 *
 * @param runDistance The distance run by the athlete on each day
 * @param targetDistance The target distance the athlete aims to achieve
 * @return The remaining distance that needs to be covered
 *
 * Example:
 * calculateDailyDistance(8.0, 100.0) -> 92.0
 * calculateDailyDistance(12.0, 120.0) -> 108.0
 * calculateDailyDistance(7.0, 70.0) -> 63.0
 */
fun calculateDailyDistance(runDistance: Double, targetDistance: Double): Double {

    var remainingDistance = targetDistance
    while (remainingDistance > 0) {
        remainingDistance -= runDistance
    }
    return remainingDistance
}