program tinh_tong;
uses crt;
var n,i:integer;
s:real;
begin
clrscr;
writeln('Nhap gia tri cho n : ');
readln(n);
s:=0;
for i:=1 to n do
s:=s+1;
writeln('Tong cua s la: ',s:5:1);
readln;
end.
Chúc bạn học tốt
program tinh_tong;
uses crt;
var n,i:integer;
s:real;
begin
clrscr;
writeln('Nhap gia tri cho n : ');
readln(n);
s:=0;
for i:=1 to n do
s:=s+1;
writeln('Tong cua s la: ',s:5:1);
readln;
end.
Chúc bạn học tốt