1)
program cau1;
var n,s:integer;
begin clrscr;
repeat
write('Nhap so nguyen: ');readln(n);
inc(s);
until n=0;
writeln('Da nhap ',s,' so');
readln;
end.
2)
program cau2;
var i,S:integer;
A:array[1..20] of integer;
begin clrscr;
S:=0;
for i:=1 to 20 do
begin
writeln('A[',i,']:'); readln(A[i]);
end;
S:=S+A[i];
write('Tong la: ',S);
readln;
end.
Học tốt!