Program prog; uses crt; var a:array[1..100] of integer; k,s,i: integer;
begin clrscr;
for i:=1 to 10 do begin write('a[',i,'] = '); readln(a[i]); end;
for i:=1 to 10 do begin if a[i] mod 3 = 0 then begin s:=s+a[i]; k:=k+1; end; end; writeln('Количество чисел, кратных 3 = ', k); writeln('Сумма чисел, кратных 3 = ', s);
uses crt;
var a:array[1..100] of integer;
k,s,i: integer;
begin
clrscr;
for i:=1 to 10 do begin
write('a[',i,'] = ');
readln(a[i]);
end;
for i:=1 to 10 do begin
if a[i] mod 3 = 0 then begin
s:=s+a[i]; k:=k+1;
end; end;
writeln('Количество чисел, кратных 3 = ', k);
writeln('Сумма чисел, кратных 3 = ', s);
end.