Question: Write a method crazy_nums that takes a number, max, and returns an array of the integers that ARE less than max AND ARE divisible by

 Write a method crazy_nums that takes a number, max, and returns

Write a method crazy_nums that takes a number, max, and returns an array of the integers that ARE less than max AND ARE divisible by either three or five BUT ARE NOT divisible by_both_three and five You should return the result in increasing order You may wish to use the modulo operation: 5 % 2 returns the remainder when dividing 5 by 2: 1 If num is divisible by, then num % i ==0. crazy_nums(3) == [] crazy_nums(10) == [3, 5, 6, 9] crazy_nums(20) == [3, 5, 6, 9, 10, 12, 18]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!