Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Jensens-Device/DWScript/jensens-device.dw
Normal file
12
Task/Jensens-Device/DWScript/jensens-device.dw
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
function sum(var i : Integer; lo, hi : Integer; lazy term : Float) : Float;
|
||||
begin
|
||||
i:=lo;
|
||||
while i<=hi do begin
|
||||
Result += term;
|
||||
Inc(i);
|
||||
end;
|
||||
end;
|
||||
|
||||
var i : Integer;
|
||||
|
||||
PrintLn(sum(i, 1, 100, 1.0/i));
|
||||
Loading…
Add table
Add a link
Reference in a new issue