Skip to content

Instantly share code, notes, and snippets.

@residentkrm
Created July 17, 2013 16:20
Show Gist options
  • Save residentkrm/6022101 to your computer and use it in GitHub Desktop.
Save residentkrm/6022101 to your computer and use it in GitHub Desktop.
uses crt;
var
x: array [1..55] of integer;
i,j: integer;
s,res: longint;
begin
ClrScr;
Randomize;
For i:=1 to 55 do
x[i]:=random(100)-50;
res:=1;
For i:=1 to 10 do
begin
s:=0;
For j:=1 to i do
s:=s+x[(i-1)*i div 2+j];
res:=res*s;
end;
Writeln (res);
ReadKey;
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment