/**
 * This function calculates the modulus of two numbers and provides a selection based on the result.
 *
 * @param a First number for modulus calculation.
 * @param b Second number for modulus calculation.
 * @return A string representing the selection based on modulus:
 * - 'Modulus is greater than 5': if modulus of a and b is greater than 5.
 * - 'Modulus is between 3 and 5': if modulus of a and b is between 3 and 5 (inclusive).
 * - 'Modulus is less than 3': if modulus of a and b is less than 3.
 * @throws IllegalArgumentException If either 'a' or 'b' is not a positive integer.
 */
fun calculateModulusSelection(a: Int, b: Int): String {

    if (a < 0 || b < 0) {
        throw IllegalArgumentException("Both 'a' and 'b' should be positive integers.")
    }

    val modulus = Math.abs(a % b)

    return when {
        modulus > 5 -> "Modulus is greater than 5"
        modulus in 3..5 -> "Modulus is between 3 and 5"
        else -> "Modulus is less than 3"
    }
}
/**
 * This function calculates the modulus of two numbers and provides a selection based on the result.
 *
 * @param a First number for modulus calculation.
 * @param b Second number for modulus calculation.
 * @return A string representing the selection based on modulus:
 * - 'Modulus is greater than 5': if modulus of a and b is greater than 5.
 * - 'Modulus is between 3 and 5': if modulus of a and b is between 3 and 5 (inclusive).
 * - 'Modulus is less than 3': if modulus of a and b is less than 3.
 * @throws IllegalArgumentException If either 'a' or 'b' is not a positive integer.
 */
fun calculateModulusSelection(a: Int, b: Int): String {
/**
 * This function calculates the modulus of two numbers and provides a selection based on the result.
 *
 * @param a First number for modulus calculation.
 * @param b Second number for modulus calculation.
 * @return A string representing the selection based on modulus:
 * - 'Modulus is greater than 5': if modulus of a and b is greater than 5.
 * - 'Modulus is between 3 and 5': if modulus of a and b is between 3 and 5 (inclusive).
 * - 'Modulus is less than 3': if modulus of a and b is less than 3.
 * @throws IllegalArgumentException If either 'a' or 'b' is not a positive integer.
 */
fun calculateModulusSelection(a: Int, b: Int): String {

    if (a < 0 || b < 0) {
        throw IllegalArgumentException("Both 'a' and 'b' should be positive integers.")
    }

    val modulus = Math.abs(a % b)

    return when {
        modulus > 5 -> "Modulus is greater than 5"
        modulus in 3..5 -> "Modulus is between 3 and 5"
        else -> "Modulus is less than 3"
    }
}