/**
 * Given two positive integers n and m, calculate the sum of the products of all possible combinations
 * of numbers between 1 and n with numbers between 1 and m.
 *
 * @param n A positive integer.
 * @param m A positive integer.
 * @return The sum of the products of all possible combinations of numbers between 1 and n with numbers between 1 and m.
 */
fun calculateSumOfProducts(n: Int, m: Int): Int {

    var total = 0
    for (i in 1..n) {
        for (j in 1..m) {
            // Calculate the product of i and j
            val product = i * j
            
            // Add the product to the total
            total += product
        }
    }
    return total
}
/**
 * Given two positive integers n and m, calculate the sum of the products of all possible combinations
 * of numbers between 1 and n with numbers between 1 and m.
 *
 * @param n A positive integer.
 * @param m A positive integer.
 * @return The sum of the products of all possible combinations of numbers between 1 and n with numbers between 1 and m.
 */
fun calculateSumOfProducts(n: Int, m: Int): Int {
/**
 * Given two positive integers n and m, calculate the sum of the products of all possible combinations
 * of numbers between 1 and n with numbers between 1 and m.
 *
 * @param n A positive integer.
 * @param m A positive integer.
 * @return The sum of the products of all possible combinations of numbers between 1 and n with numbers between 1 and m.
 */
fun calculateSumOfProducts(n: Int, m: Int): Int {

    var total = 0
    for (i in 1..n) {
        for (j in 1..m) {
            // Calculate the product of i and j
            val product = i * j
            
            // Add the product to the total
            total += product
        }
    }
    return total
}