printFactors
that accepts an integer as its parameter and that prints the factors of that number, separated by the word "and"
. Recall that a factor is a number that goes evenly into another number.
For example, the call printFactors(24)
should print the following output:
1 and 2 and 3 and 4 and 6 and 8 and 12 and 24