Skip to content

Instantly share code, notes, and snippets.

@Kanol
Created April 12, 2015 15:45
Show Gist options
  • Save Kanol/88122e97cf5d37e18d19 to your computer and use it in GitHub Desktop.
Save Kanol/88122e97cf5d37e18d19 to your computer and use it in GitHub Desktop.
program n1;
var a, square, sum, i:integer;
begin
Readln(a);
for i:=1 to a do begin
square:= a*a;
sum:= sum+square;
a:=a-1;
end;
writeln(sum);
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment