The Arithmetic Check
EasyAcc. 96.2%
+15 XP 5
Constant Strides
In an Arithmetic Progression, the difference between any two consecutive terms is constant. Example: 2, 5, 8, 11 (difference is 3).
The Assignment
Your function receives parameters start, count, and diff.
- Use a loop to print exactly
countnumbers. - The sequence should start at
startand increase bydiffeach time.
01EXAMPLE 1
Input
start=2, count=3, diff=3Output
2
5
8Explanation: Starts at 2, adds 3 twice.
Constraints
- Print each number on a new line.
- Handle negative differences correctly.
MathLoops
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
start2
count3
diff3
Expected Output
2 5 8
Click RUN to test your solution