program sum_of_multiples_of_7;
vara, b, sum, i: integer;
beginsum := 0;
write('Enter the lower bound of the interval: ');readln(a);
write('Enter the upper bound of the interval: ');readln(b);
for i := b downto a dobeginif (i mod 7 = 0) thenbeginsum := sum + i;write(i, ' ');end;end;
writeln;writeln('The sum of multiples of 7 in the interval [', a, ',', b, '] is: ', sum);end.
program sum_of_multiples_of_7;
var
a, b, sum, i: integer;
begin
sum := 0;
write('Enter the lower bound of the interval: ');
readln(a);
write('Enter the upper bound of the interval: ');
readln(b);
for i := b downto a do
begin
if (i mod 7 = 0) then
begin
sum := sum + i;
write(i, ' ');
end;
end;
writeln;
writeln('The sum of multiples of 7 in the interval [', a, ',', b, '] is: ', sum);
end.