Question: /** * Returns the sum of the numbers between zero and the * first parameter that are divisible by the second number. * For example,

/**

* Returns the sum of the numbers between zero and the

* first parameter that are divisible by the second number.

* For example, sumOfProducts(10, 3) will return 3 + 6 + 9

* = 18, and sumOfProducts(10, 2) will return 2 + 4

* + 6 + 8 + 10 = 30 and sumOfProducts(-10, 2) will

* return -2 + -4 + -6 + -8 + -10 = -30.

* @param bound the upper bound

* @param divisor the divisor

* @return sum

*/

public int sumOfProducts(int bound, int divisor) {

return 0;

}

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!