2 câu trả lời
Program tong_le;
Uses crt;
Var S,i: integer;
Begin
S:=0;
For i:=1 to 999 do If i mod 2 =1 then S:=S+i;
Write('Tong la:',S); readln;
End.
var i,kq:integer;
begin
for i:=1 to 1000 do
if not (i mod 2 = 0) then inc(kq,i);
write('Tong cac so le nho hon 1000 la: ',kq);
end.