Uses crt; var i,b,x,q:integer; c:real; var a: array [1..3] of integer; begin clrscr; writeln('Введите числа'); for i:=1 to 3 do read(a[i]); q:=1; for i:=1 to 3 do begin if (a[i] mod 3 = 0) and ( a[i] mod 2 = 1 )then x:=x+1; if (a[i] mod 3 = 0) and ( a[i] mod 2 = 1 )then b:=b+a[i]; if (a[i] mod 3 = 0) and ( a[i] mod 2 = 1 )then q:=q*a[i]; c:=b/x; end; writeln('Среднее арифметическое = ',c); writeln('Произведение = ',q); end.
var i,b,x,q:integer;
c:real;
var a: array [1..3] of integer;
begin
clrscr;
writeln('Введите числа');
for i:=1 to 3 do
read(a[i]);
q:=1;
for i:=1 to 3 do begin
if (a[i] mod 3 = 0) and ( a[i] mod 2 = 1 )then x:=x+1;
if (a[i] mod 3 = 0) and ( a[i] mod 2 = 1 )then b:=b+a[i];
if (a[i] mod 3 = 0) and ( a[i] mod 2 = 1 )then q:=q*a[i];
c:=b/x;
end;
writeln('Среднее арифметическое = ',c);
writeln('Произведение = ',q);
end.