Program BTT; Uses crt; Var A: array[1..10000] of longint; n,i,s: longint; Begin Clrscr; 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 If A[i]>=6 then s:=s+A[i]; Write('Tong la: ',s); Readln End.