/**
 * A carpenter needs to calculate the total number of wood pallets needed to build a certain number of tables and chairs per table
 */
fun calculateMaterials(numOfTables: Int, numOfChairsPerTable: Int, numOfWoodPallets: Int): Int {

    var totalPallets = 0
    var tableCounter = 0

    while (tableCounter < numOfTables) {
        tableCounter++
        var chairCounter = 0

        while (chairCounter < numOfChairsPerTable) {
            chairCounter++

            // Compute the number of wood pallets required for each chair
            if (chairCounter > numOfWoodPallets) {
                // 'break' statement is missing
                break
            }

            totalPallets++
        }

        // Compute the number of wood pallets required for each table
        if (tableCounter > numOfWoodPallets) {
            // 'continue' statement is missing
            continue
        }

        totalPallets++
    }

    return totalPallets
}
/**
 * A carpenter needs to calculate the total number of wood pallets needed to build a certain number of tables and chairs per table
 */
fun calculateMaterials(numOfTables: Int, numOfChairsPerTable: Int, numOfWoodPallets: Int): Int {
/**
 * A carpenter needs to calculate the total number of wood pallets needed to build a certain number of tables and chairs per table
 */
fun calculateMaterials(numOfTables: Int, numOfChairsPerTable: Int, numOfWoodPallets: Int): Int {

    var totalPallets = 0
    var tableCounter = 0

    while (tableCounter < numOfTables) {
        tableCounter++
        var chairCounter = 0

        while (chairCounter < numOfChairsPerTable) {
            chairCounter++

            // Compute the number of wood pallets required for each chair
            if (chairCounter > numOfWoodPallets) {
                // 'break' statement is missing
                break
            }

            totalPallets++
        }

        // Compute the number of wood pallets required for each table
        if (tableCounter > numOfWoodPallets) {
            // 'continue' statement is missing
            continue
        }

        totalPallets++
    }

    return totalPallets
}