/**
 * This function calculates the return on investment (ROI) for a marketing campaign based on the advertising cost
 * and revenue generated.
 *
 * @param advertisingCost The total cost of advertising for the campaign.
 * @param revenueGenerated The total revenue generated from the campaign.
 * @return The ROI value as a percentage.
 * @throws IllegalArgumentException If any of the input arguments are negative.
 */
fun calculateMarketingRoi(advertisingCost: Float, revenueGenerated: Float): Float {

    if (advertisingCost < 0 || revenueGenerated < 0) {
        throw IllegalArgumentException("Advertising cost and revenue generated must be non-negative.")
    }
    
    return (revenueGenerated - advertisingCost) / advertisingCost * 100
}
/**
 * This function calculates the return on investment (ROI) for a marketing campaign based on the advertising cost
 * and revenue generated.
 *
 * @param advertisingCost The total cost of advertising for the campaign.
 * @param revenueGenerated The total revenue generated from the campaign.
 * @return The ROI value as a percentage.
 * @throws IllegalArgumentException If any of the input arguments are negative.
 */
fun calculateMarketingRoi(advertisingCost: Float, revenueGenerated: Float): Float {
/**
 * This function calculates the return on investment (ROI) for a marketing campaign based on the advertising cost
 * and revenue generated.
 *
 * @param advertisingCost The total cost of advertising for the campaign.
 * @param revenueGenerated The total revenue generated from the campaign.
 * @return The ROI value as a percentage.
 * @throws IllegalArgumentException If any of the input arguments are negative.
 */
fun calculateMarketingRoi(advertisingCost: Float, revenueGenerated: Float): Float {

    if (advertisingCost < 0 || revenueGenerated < 0) {
        throw IllegalArgumentException("Advertising cost and revenue generated must be non-negative.")
    }
    
    return (revenueGenerated - advertisingCost) / advertisingCost * 100
}