Answer:
You can buy 42 cookies in 12 ways.
Step-by-step explanation:
The first way of buying 42 cookies is by buying 2 packages of 21 (21x2 = 42).
The second way is by buying 1 package of 21 and 3 packages of 7 (21 + 3x7 = 42).
The third way is by buying 1 package of 21 and 21 single cookies (21 + 21 = 42).
The fourth way is by buying 1 package of 21, 1 package of 7 and 14 single cookies (21 + 7 + 14 = 42).
The fifth way is by buying 1 package of 21, 2 packages of 7 and 7 single cookies (21 + 14 + 7 = 42).
The sixth way is by buying 6 packages of 7 (7x6 = 42).
The seventh way is by buying 5 packages of 7 and 7 single cookies (7x5 + 7 = 42).
The eight way is by buying 4 packages of 7 and 14 single cookies (7x4 + 14 = 42).
The ninth way is by buying 3 packages of 7 and 21 single cookies (7x3 + 21 = 42).
The tenth way is by buying 2 packages of 7 and 28 single cookies (7x2 + 28 = 42).
The eleventh way is by buying 1 package of 7 and 35 single cookies (7 + 35 = 42).
Finally, the twelfth way is by buying 42 single cookies (42 = 42).