Skip to content

Instantly share code, notes, and snippets.

@fogus
Created October 5, 2012 14:16
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/3840018 to your computer and use it in GitHub Desktop.
Save fogus/3840018 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