/**
 * A function to calculate a musician's pay for a gig based on the number of hours worked and hourly rate.
 * If the gig exceeds 8 hours, the musician is eligible for overtime pay at a rate of 1.5 times the hourly rate.
 */
fun calculatePay(hoursWorked: Int, hourlyRate: Double): Double {

    var totalPay = 0.0
    if (hoursWorked <= 8) {
        totalPay = hoursWorked * hourlyRate
    } else {
        val overtimeHours = hoursWorked - 8
        totalPay = (8 * hourlyRate) + (overtimeHours * hourlyRate * 1.5)
    }
    return totalPay
}
/**
 * A function to calculate a musician's pay for a gig based on the number of hours worked and hourly rate.
 * If the gig exceeds 8 hours, the musician is eligible for overtime pay at a rate of 1.5 times the hourly rate.
 */
fun calculatePay(hoursWorked: Int, hourlyRate: Double): Double {
/**
 * A function to calculate a musician's pay for a gig based on the number of hours worked and hourly rate.
 * If the gig exceeds 8 hours, the musician is eligible for overtime pay at a rate of 1.5 times the hourly rate.
 */
fun calculatePay(hoursWorked: Int, hourlyRate: Double): Double {

    var totalPay = 0.0
    if (hoursWorked <= 8) {
        totalPay = hoursWorked * hourlyRate
    } else {
        val overtimeHours = hoursWorked - 8
        totalPay = (8 * hourlyRate) + (overtimeHours * hourlyRate * 1.5)
    }
    return totalPay
}