/**
 * This function calculates the total number of photos sold by a photographer,
 * taking into account the number of photos already sold, the total number of
 * photos available, and whether it was a special event or not.
 *
 * @param totalPhotos The total number of photos available.
 * @param photosSold The number of photos already sold.
 * @param specialEvent Whether it was a special event or not.
 * @return The updated total number of photos sold.
 */
fun calculatePhotosSold(totalPhotos: Int, photosSold: Int, specialEvent: Boolean): Int {

    var updatedPhotosSold = photosSold

    if (specialEvent) {
        updatedPhotosSold += 100
    } else if (totalPhotos - photosSold >= 200) {
        updatedPhotosSold += 200
    } else {
        updatedPhotosSold = totalPhotos
    }

    return updatedPhotosSold
}
/**
 * This function calculates the total number of photos sold by a photographer,
 * taking into account the number of photos already sold, the total number of
 * photos available, and whether it was a special event or not.
 *
 * @param totalPhotos The total number of photos available.
 * @param photosSold The number of photos already sold.
 * @param specialEvent Whether it was a special event or not.
 * @return The updated total number of photos sold.
 */
fun calculatePhotosSold(totalPhotos: Int, photosSold: Int, specialEvent: Boolean): Int {
/**
 * This function calculates the total number of photos sold by a photographer,
 * taking into account the number of photos already sold, the total number of
 * photos available, and whether it was a special event or not.
 *
 * @param totalPhotos The total number of photos available.
 * @param photosSold The number of photos already sold.
 * @param specialEvent Whether it was a special event or not.
 * @return The updated total number of photos sold.
 */
fun calculatePhotosSold(totalPhotos: Int, photosSold: Int, specialEvent: Boolean): Int {

    var updatedPhotosSold = photosSold

    if (specialEvent) {
        updatedPhotosSold += 100
    } else if (totalPhotos - photosSold >= 200) {
        updatedPhotosSold += 200
    } else {
        updatedPhotosSold = totalPhotos
    }

    return updatedPhotosSold
}