ответ:uses crt;
const n=8;
var a:array[1..n] of integer;
i,s:integer;
BEGIN
clrscr;
for i:=1 to n do
a[i]:=random(10);
write(a[i]:4);
writeln;
s:=0;
if a[i] mod 2<>0 then
s:=s+a[i];
write('Symma = ',s);
readkey;
END.
Объяснение:
ответ:uses crt;
const n=8;
var a:array[1..n] of integer;
i,s:integer;
BEGIN
clrscr;
for i:=1 to n do
a[i]:=random(10);
for i:=1 to n do
write(a[i]:4);
writeln;
s:=0;
for i:=1 to n do
if a[i] mod 2<>0 then
s:=s+a[i];
write('Symma = ',s);
readkey;
END.
Объяснение: