Hey guys my H.W. asks me to write some code that, given a number n stored in an integer variable n, computes the product of all numbers less than or equal to n that are divisible by 2 or 3.
I think I have the right idea but i'm unsure of what I am suppose to do next. I don't know how to have the numbers multiply each other once I find out that they are divisible by 2 or 3.
Thanks MiiNiPaa I totally over looked those. After fixing it the only problem I have now is that sum is giving me the wrong answer. For example, if I enter n to be 4 I get the answer 10 for my sum when it really should be 24.