Var i , x : integer;
S : real;
Begin
write (' x = '); read (x);
S:=0;
For i:=1 to x do S:= S+i;
Write (S);
Readln;
End.
program bai1;
var s,i,x:longint;
begin
write('x= ');
readln(x);
s:=1;
for i:=2 to n do
s:=s+1/i;
write('s= ',s);
readln
end.
Program Tinhtong;
Uses Crt;
Var i, S: longint;
Begin
Clrscr;
Writeln('Nhap so x'); Readln(x);
S:=0;
For i := 2 to x do
S:=S+1/i;
Writeln('Ket qua',S);
Readln;
End.