I need help creating a function that takes 5 integer inputs and does the following:
If exactly 2 or 3 of the first four inputs are not divisible by the last input I want the output to read “Impossible”
If exactly 1 of the first four inputs (let’s call it Z) is not divisible by the last input, then I want the output to be the smallest integer congruent to the last input modulo Z.
If all the first four integers are divisible by the last integer, I want the output to be the sum the first four digits.
I’m trying to teach myself Mathematica, and need a lot of help...