fpc/tests/webtbs/tw5094.pp
Jonas Maebe 678519c9d9 - removed -Ooasmcse
git-svn-id: trunk@30841 -
2015-05-10 13:39:28 +00:00

21 lines
308 B
ObjectPascal

{ %OPT=-O-1 -Oonoregvar }
function B(n, k: Integer):Integer;
var
i: Integer;
begin
if k > n-k then
k := n-k;
B := 1;
for i := n-k+1 to n do
B := B * i;
for i := 2 to k do
B := B div i;
end;
begin
if B(0,1) <> 1 then
halt(1); { Should write 1; fpc -O1 binom.pas writes 0 }
end.