Var i, n,s: longint;
Begin
Write('Nhap so luong so le can tinh tong ');readln(n);
For i:=1 to n do
if i mod 2 <> 0 then s:=s+i;
write('Tong cua ',n,' so le dau tien la ',s);
readln;
end.
Program tinhtong;
uses crt;
var A, N, i: integer;
begin
clrscr;
write ('nhap N = '); Readln (N);
A:=0;
for i:=1 to N do A:= A+(i*2-1);
writeln ('tong = ',A);
readln;
End.
uses crt;
var n,i,s:integer;
begin
clrscr;
write('Nhap n='); readln(n);
s:=0;
for i:=1 to 2*n do
if i mod 2=1 then s:=s+i;
writeln(s);
readln;
end.