Question: summation(int from, int to, int step) -- Return the summation of numbers starting at parameter 'from' and ending at parameter 'to' (inclusive) with a step
summation(int from, int to, int step) -- Return the summation of numbers starting at parameter 'from' and ending at parameter 'to' (inclusive) with a step given by the parameter 'step'
summation(10, 100, 5) 1045 summation(0, 10, 5) 15 summation(-10, 100, 7) 680
given:
private int summation(int from, int to, int step) { }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
