Sum of numbers in an interval

Write a funcion @sum_interval(a, b, n)@ that receives two integers a, b
such that 0 ≤ a ≤ b, and a natural 0 ≤ n ≤ 9, and returns the sum of all
integers in [a, b] whose last digit is n.

Sample session

Problem information

Author: ProAl

Generation: 2026-01-25T15:54:06.888Z

© Jutge.org, 2006–2026.
https://jutge.org
