/**
 * This function calculates the total bill amount including tax.
 *
 * @param billAmount The original bill amount
 * @param taxRate The tax rate in percentage
 * @return The total bill amount including tax
 * @throws IllegalArgumentException If the bill amount is negative or if the tax rate is negative
 */
fun calculateBill(billAmount: Double, taxRate: Double): Double {

    if (billAmount < 0) {
        throw IllegalArgumentException("Bill amount cannot be negative.")
    }

    if (taxRate < 0) {
        throw IllegalArgumentException("Tax rate cannot be negative.")
    }

    val totalAmount = billAmount + (billAmount * taxRate / 100)
    return totalAmount
}
/**
 * This function calculates the total bill amount including tax.
 *
 * @param billAmount The original bill amount
 * @param taxRate The tax rate in percentage
 * @return The total bill amount including tax
 * @throws IllegalArgumentException If the bill amount is negative or if the tax rate is negative
 */
fun calculateBill(billAmount: Double, taxRate: Double): Double {
/**
 * This function calculates the total bill amount including tax.
 *
 * @param billAmount The original bill amount
 * @param taxRate The tax rate in percentage
 * @return The total bill amount including tax
 * @throws IllegalArgumentException If the bill amount is negative or if the tax rate is negative
 */
fun calculateBill(billAmount: Double, taxRate: Double): Double {

    if (billAmount < 0) {
        throw IllegalArgumentException("Bill amount cannot be negative.")
    }

    if (taxRate < 0) {
        throw IllegalArgumentException("Tax rate cannot be negative.")
    }

    val totalAmount = billAmount + (billAmount * taxRate / 100)
    return totalAmount
}