/**
 * This function calculates the total fee earned by a Carpenter.
 *
 * The Carpenter has completed several jobs and each job took a certain amount of hours.
 * The function takes in the total number of jobs, total hours worked, and the hourly rate
 * charged by the Carpenter. It then calculates and returns the total fee earned.
 *
 * @param totalJobs The total number of jobs completed by the Carpenter.
 * @param totalHours The total number of hours worked by the Carpenter.
 * @param hourlyRate The hourly rate charged by the Carpenter.
 * @return The total fee earned by the Carpenter.
 */
fun calculateCarpenterFee(totalJobs: Int, totalHours: Int, hourlyRate: Double): Double {

    var fee = 0.0
    var jobCount = 0

    while (jobCount < totalJobs) {
        var hoursWorked = 0

        while (hoursWorked < totalHours) {
            // Calculate the fee for each hour worked
            fee += hourlyRate

            // Increment the hours worked by 1
            hoursWorked++
        }

        // Increment the job count by 1
        jobCount++
    }

    return fee
}
/**
 * This function calculates the total fee earned by a Carpenter.
 *
 * The Carpenter has completed several jobs and each job took a certain amount of hours.
 * The function takes in the total number of jobs, total hours worked, and the hourly rate
 * charged by the Carpenter. It then calculates and returns the total fee earned.
 *
 * @param totalJobs The total number of jobs completed by the Carpenter.
 * @param totalHours The total number of hours worked by the Carpenter.
 * @param hourlyRate The hourly rate charged by the Carpenter.
 * @return The total fee earned by the Carpenter.
 */
fun calculateCarpenterFee(totalJobs: Int, totalHours: Int, hourlyRate: Double): Double {
/**
 * This function calculates the total fee earned by a Carpenter.
 *
 * The Carpenter has completed several jobs and each job took a certain amount of hours.
 * The function takes in the total number of jobs, total hours worked, and the hourly rate
 * charged by the Carpenter. It then calculates and returns the total fee earned.
 *
 * @param totalJobs The total number of jobs completed by the Carpenter.
 * @param totalHours The total number of hours worked by the Carpenter.
 * @param hourlyRate The hourly rate charged by the Carpenter.
 * @return The total fee earned by the Carpenter.
 */
fun calculateCarpenterFee(totalJobs: Int, totalHours: Int, hourlyRate: Double): Double {

    var fee = 0.0
    var jobCount = 0

    while (jobCount < totalJobs) {
        var hoursWorked = 0

        while (hoursWorked < totalHours) {
            // Calculate the fee for each hour worked
            fee += hourlyRate

            // Increment the hours worked by 1
            hoursWorked++
        }

        // Increment the job count by 1
        jobCount++
    }

    return fee
}