Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
505 kaklik 1
program suma;
2
 
3
uses crt;
4
 
5
var n : integer;
6
 
7
 
8
function secti(n:integer) : integer;
9
 
10
var i,sum : integer;
11
 
12
begin
13
   sum :=0;
14
 
15
   for i:=1 to n do
16
   begin
17
      sum:= sum + i;
18
   end;
19
 
20
   secti :=sum;
21
end;
22
 
23
begin
24
 
25
   clrscr;
26
 
27
   write ('zadejte hodnotu');
28
   readln (n);
29
 
30
 
31
   write('vysledek je',secti(n));
32
   readln;
33
 
34
end.