fpc/tests/bench/shootout/obsolete/nestloop.pp
Vincent Snijders 7a643c0907 * moved obsolete shootout benchmark to obsolete directory
git-svn-id: trunk@4852 -
2006-10-10 19:50:26 +00:00

28 lines
424 B
ObjectPascal

{ Nested Loops }
program nestedloop;
uses SysUtils;
var n, a, b, c, d, e, f : integer;
var x : longint;
begin
if ParamCount = 0 then
n := 1
else
n := StrToInt(ParamStr(1));
if n < 1 then n := 1;
x := 0;
For a := 1 to n Do
For b := 1 to n Do
For c := 1 to n Do
For d := 1 to n Do
For e := 1 to n Do
For f := 1 to n Do
Inc(x);
WriteLn( IntToStr(x) );
end.