var
a:array [1..50] of integer;
i,n,p:integer;
begin
repeat
write ('Razmer massiva: ');
readln(n);
until n in [1..50];
for i:=1 to n do
write ('A[',i,'] = ');
readln(a[i]);
end;
p:=a[1]*a[n];
writeln ('Proizvedenie: ',p);
readln;
end.
var
a:array [1..50] of integer;
i,n,p:integer;
begin
repeat
write ('Razmer massiva: ');
readln(n);
until n in [1..50];
for i:=1 to n do
begin
write ('A[',i,'] = ');
readln(a[i]);
end;
p:=a[1]*a[n];
writeln ('Proizvedenie: ',p);
readln;
end.