program TinhTongSo;
uses crt;
var
a: array [1..10] of integer;
i, tong, dem: integer;
begin
clrscr;
writeln('Nhap day 10 so nguyen: ');
for i := 1 to 10 do
begin
write('Nhap so thu ', i, ': ');
readln(a[i]);
end;
writeln('Day so da nhap tren mot hang: ');
for i := 1 to 10 do
write(a[i], ' ');
tong := 0;
for i := 1 to 10 do
if a[i] < 0 then
tong := tong + a[i];
writeln('Tong cac so nguyen am: ', tong);
dem := 0;
for i := 1 to 10 do
if (a[i] > 6) and (a[i] < 9) then
dem := dem + 1;
writeln('So luong cac so thoa dieu kien "lon hon 6 va nho hon 9": ', dem);
readln;
end.