Skip to content

Instantly share code, notes, and snippets.

@fogus
Created September 15, 2014 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fogus/1258aaa31c349c8f45f0 to your computer and use it in GitHub Desktop.
Save fogus/1258aaa31c349c8f45f0 to your computer and use it in GitHub Desktop.
#lang algol60
begin
integer procedure SIGMA(x, i, n);
value n;
integer x, i, n;
begin
integer sum;
sum:=0;
for i:=1 step 1 until n do
sum:=sum+x;
SIGMA:=sum;
end;
integer q;
printnln(SIGMA(q*2-1, q, 7));
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment