Program Suma;
Var S,n,I:integer;
Begin
 Write('n=');
 Read(n);
 For I:=1 to n do S:=S+I;
 Writeln('S=',S:6);
End.
Published in: Pascal
Download

Related snippets