This repository has been archived on 2024-12-25. You can view files and clone it, but cannot push or open issues or pull requests.
2024-03-10 20:32:51 +03:00

12 lines
240 B
ObjectPascal

// Переменное число параметров
function Sum(params arg: array of integer): integer;
begin
Result := 0;
foreach var x in arg do
Result += x;
end;
begin
writeln(Sum(1,2,3));
writeln(Sum(4,5,6,7));
end.