/**
 * A farmer wants to calculate the total profit from selling animals.
 * The function calculateTotalProfit takes in two parameters:
 * numAnimals: the number of animals the farmer wants to sell
 * costPerAnimal: the selling price of each animal
 *
 * The function should return the total profit the farmer will make.
 *
 * Task:
 * You need to complete the code to calculate the total profit.
 * Use a basic loop syntax to iterate through each animal.
 *
 * Example:
 * calculateTotalProfit(5, 200) -> should return 1000
 */
fun calculateTotalProfit(numAnimals: Int, costPerAnimal: Int): Int {

    var totalProfit = 0

    // Loop through each animal using a basic loop syntax
    for (animal in 0 until numAnimals) {
        totalProfit += costPerAnimal
    }

    return totalProfit
}
/**
 * A farmer wants to calculate the total profit from selling animals.
 * The function calculateTotalProfit takes in two parameters:
 * numAnimals: the number of animals the farmer wants to sell
 * costPerAnimal: the selling price of each animal
 *
 * The function should return the total profit the farmer will make.
 *
 * Task:
 * You need to complete the code to calculate the total profit.
 * Use a basic loop syntax to iterate through each animal.
 *
 * Example:
 * calculateTotalProfit(5, 200) -> should return 1000
 */
fun calculateTotalProfit(numAnimals: Int, costPerAnimal: Int): Int {
/**
 * A farmer wants to calculate the total profit from selling animals.
 * The function calculateTotalProfit takes in two parameters:
 * numAnimals: the number of animals the farmer wants to sell
 * costPerAnimal: the selling price of each animal
 *
 * The function should return the total profit the farmer will make.
 *
 * Task:
 * You need to complete the code to calculate the total profit.
 * Use a basic loop syntax to iterate through each animal.
 *
 * Example:
 * calculateTotalProfit(5, 200) -> should return 1000
 */
fun calculateTotalProfit(numAnimals: Int, costPerAnimal: Int): Int {

    var totalProfit = 0

    // Loop through each animal using a basic loop syntax
    for (animal in 0 until numAnimals) {
        totalProfit += costPerAnimal
    }

    return totalProfit
}