Question: Function 3: Cut and paste the following function into your program: / multiples accepts an integer num and an integer range for startRange to endRange.
Function 3: Cut and paste the following function into your program: / multiples accepts an integer num and an integer range for startRange to endRange. It returns the count of numbers that are multiples of num in the range. Note that since zero times any number is 0, 0 is the only multiple of zero. *
/ int multiples(int num, int startRange, int endRange) { int count = 1; if (num == 0) { return count; } for (int i = startRange; i <= endRange; i++) { if (i%num == 0) { count++; } } return count; } o Test Function 3, multiples: Write a function to test the multiples function IN PROCESSING. Be sure to read the description of the function in the comments. Include all the appropriate test cases for different types of output. You will lose points for missing important test cases. Your test function should give each test a name, e.g. Test 1, Test 2, etc. The test function should print the name of the test and whether the test succeeded or failed.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
