program tinhTong;
var
n,i,s: integer;
a: array[1..100] of integer;
begin
write('Nhap so luong phan tu: ');
readln(n);
for i := 1 to n do
begin
write('a[',i,'] = ');
readln(a[i]);
end;
s := 0;
for i := 1 to n do
begin
if (a[i] mod 5 <> 0) then
s := s + a[i];
end;
writeln('Tong cac so khong chia het cho 5: ', s);
readln;
end.
program TinhTong;
var
n, i, s, x: integer;
begin
write('Nhap so luong phan tu cua day: ');
readln(n);
s := 0;
for i := 1 to n do
begin
write('Nhap phan tu thu ', i, ': ');
readln(x);
if (x mod 5 <> 0) then
s := s + x;
end;
writeln('Tong cac so khong chia het cho 5 la: ', s);
end.