Blame | Last modification | View Log | Download
program suma;
uses crt;
var n : integer;
function secti(n:integer) : integer;
var i,sum : integer;
begin
sum :=0;
for i:=1 to n do
begin
sum:= sum + i;
end;
secti :=sum;
end;
begin
clrscr;
write ('zadejte hodnotu');
readln (n);
write('vysledek je',secti(n));
readln;
end.