Sum of numbers in an interval

Write a funcion @sum_interval(a, b)@ that receives two integers a,ba,b such that aba \le b, and returns the sum of all integers in [a,b][a,b].

Sample session

Problem information

Author: ProAl

Generation: 2026-01-25T13:49:36.824Z

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