/**
 * A veterinarian wants to know the number of available slots for pets in their clinic.
 * They have a limited number of slots for pets and need to calculate the remaining slots after some pets have been adopted.
 *
 * The veterinarian has [pets] number of available slots for pets.
 * [adoptedPets] is the number of pets that have been adopted and taken up a slot.
 *
 * Your task is to write a function that takes in these two parameters and returns the number of available slots remaining.
 * Remember that there cannot be negative available slots.
 *
 * Example:
 * ----------
 * Input:
 * pets = 10
 * adoptedPets = 3
 * Output:
 * remainingSlots = 7
 * Explanation:
 * There are initially 10 slots available for pets. After 3 pets have been adopted, there are 7 slots remaining.
 */
fun availableSlots(pets: Int, adoptedPets: Int): Int {

    val remainingSlots = pets - adoptedPets
    return if (remainingSlots >= 0) remainingSlots else 0
}
/**
 * A veterinarian wants to know the number of available slots for pets in their clinic.
 * They have a limited number of slots for pets and need to calculate the remaining slots after some pets have been adopted.
 *
 * The veterinarian has [pets] number of available slots for pets.
 * [adoptedPets] is the number of pets that have been adopted and taken up a slot.
 *
 * Your task is to write a function that takes in these two parameters and returns the number of available slots remaining.
 * Remember that there cannot be negative available slots.
 *
 * Example:
 * ----------
 * Input:
 * pets = 10
 * adoptedPets = 3
 * Output:
 * remainingSlots = 7
 * Explanation:
 * There are initially 10 slots available for pets. After 3 pets have been adopted, there are 7 slots remaining.
 */
fun availableSlots(pets: Int, adoptedPets: Int): Int {
/**
 * A veterinarian wants to know the number of available slots for pets in their clinic.
 * They have a limited number of slots for pets and need to calculate the remaining slots after some pets have been adopted.
 *
 * The veterinarian has [pets] number of available slots for pets.
 * [adoptedPets] is the number of pets that have been adopted and taken up a slot.
 *
 * Your task is to write a function that takes in these two parameters and returns the number of available slots remaining.
 * Remember that there cannot be negative available slots.
 *
 * Example:
 * ----------
 * Input:
 * pets = 10
 * adoptedPets = 3
 * Output:
 * remainingSlots = 7
 * Explanation:
 * There are initially 10 slots available for pets. After 3 pets have been adopted, there are 7 slots remaining.
 */
fun availableSlots(pets: Int, adoptedPets: Int): Int {

    val remainingSlots = pets - adoptedPets
    return if (remainingSlots >= 0) remainingSlots else 0
}