I found the code on the Internet but I can not understand what's what.
Task:
Print the squares of natural numbers from 0 to n using "+" and "-"
k:=0; k_square:=0; writeln(k.square); while not (k=n) do begin k:= k+1; k_square:=k_square+k+k-1; writeln(k_square); end;