/**
 * This exercise requires the implementation of nested loops and the condition of less than.
 * This code will generate a multiplication table of num1 and num2, where each element is less than num1 * num2.
 */
fun nestedLoopsLessThan(num1: Int, num2: Int) {

    // Create a 2D list to store the multiplication table
    val table = Array(num1) { IntArray(num2) }

    // Iterate through each row of the table
    for (i in 0 until num1) {
        // Iterate through each column of the table
        for (j in 0 until num2) {
            // Calculate the multiplication result
            table[i][j] = (i + 1) * (j + 1)
        }
    }

    // Iterate through each row of the table
    for (row in table) {
        // Iterate through each element of the row
        for (element in row) {
            // Check if the element is less than num1 * num2
            if (element < num1 * num2) {
                print("$element ")
            }
        }
        println()
    }
}
/**
 * This exercise requires the implementation of nested loops and the condition of less than.
 * This code will generate a multiplication table of num1 and num2, where each element is less than num1 * num2.
 */
fun nestedLoopsLessThan(num1: Int, num2: Int) {
/**
 * This exercise requires the implementation of nested loops and the condition of less than.
 * This code will generate a multiplication table of num1 and num2, where each element is less than num1 * num2.
 */
fun nestedLoopsLessThan(num1: Int, num2: Int) {

    // Create a 2D list to store the multiplication table
    val table = Array(num1) { IntArray(num2) }

    // Iterate through each row of the table
    for (i in 0 until num1) {
        // Iterate through each column of the table
        for (j in 0 until num2) {
            // Calculate the multiplication result
            table[i][j] = (i + 1) * (j + 1)
        }
    }

    // Iterate through each row of the table
    for (row in table) {
        // Iterate through each element of the row
        for (element in row) {
            // Check if the element is less than num1 * num2
            if (element < num1 * num2) {
                print("$element ")
            }
        }
        println()
    }
}