/**
 * The librarian wants to calculate the fine amount for books returned after the due date based on the number of days late and the overdue rate.
 *
 * Write a Kotlin function called "calculateFine" that takes two arguments:
 * - daysLate: an integer representing the number of days the book is returned after the due date.
 * - overdueRate: a float representing the daily fine rate.
 *
 * The function should return the total fine amount. The fine amount is calculated by multiplying the number of days late by the daily fine rate.
 *
 * Example:
 * calculateFine(10, 0.75) returns 7.5
 * calculateFine(5, 1.25) returns 6.25
 *
 * Remember to handle negative or zero daysLate properly. In such cases, the function should return zero as the fine amount.
 *
 * In this exercise, you should use the OR operator to make the function more efficient by directly returning zero if daysLate is negative or zero.
 *
 * Make sure to write proper Kotlin code and test your function.
 *
 * --- Difficulty: ★★★★☆ ---
 */
fun calculateFine(daysLate: Int, overdueRate: Float): Float {

    return if (daysLate > 0) daysLate * overdueRate else 0.0f
}
/**
 * The librarian wants to calculate the fine amount for books returned after the due date based on the number of days late and the overdue rate.
 *
 * Write a Kotlin function called "calculateFine" that takes two arguments:
 * - daysLate: an integer representing the number of days the book is returned after the due date.
 * - overdueRate: a float representing the daily fine rate.
 *
 * The function should return the total fine amount. The fine amount is calculated by multiplying the number of days late by the daily fine rate.
 *
 * Example:
 * calculateFine(10, 0.75) returns 7.5
 * calculateFine(5, 1.25) returns 6.25
 *
 * Remember to handle negative or zero daysLate properly. In such cases, the function should return zero as the fine amount.
 *
 * In this exercise, you should use the OR operator to make the function more efficient by directly returning zero if daysLate is negative or zero.
 *
 * Make sure to write proper Kotlin code and test your function.
 *
 * --- Difficulty: ★★★★☆ ---
 */
fun calculateFine(daysLate: Int, overdueRate: Float): Float {
/**
 * The librarian wants to calculate the fine amount for books returned after the due date based on the number of days late and the overdue rate.
 *
 * Write a Kotlin function called "calculateFine" that takes two arguments:
 * - daysLate: an integer representing the number of days the book is returned after the due date.
 * - overdueRate: a float representing the daily fine rate.
 *
 * The function should return the total fine amount. The fine amount is calculated by multiplying the number of days late by the daily fine rate.
 *
 * Example:
 * calculateFine(10, 0.75) returns 7.5
 * calculateFine(5, 1.25) returns 6.25
 *
 * Remember to handle negative or zero daysLate properly. In such cases, the function should return zero as the fine amount.
 *
 * In this exercise, you should use the OR operator to make the function more efficient by directly returning zero if daysLate is negative or zero.
 *
 * Make sure to write proper Kotlin code and test your function.
 *
 * --- Difficulty: ★★★★☆ ---
 */
fun calculateFine(daysLate: Int, overdueRate: Float): Float {

    return if (daysLate > 0) daysLate * overdueRate else 0.0f
}