program tich; uses crt; var n, i: byte; a: array[1..250] of integer; max:Integer; function tich(a: integer): integer; var s: string; x, i: byte; begin str(a, s); tich:=1; for i:=1 to length(s) do begin val(s[i], x, i); tich:=tich*x; end; end; begin clrscr; write(‘n = ‘); readln(n); for i:=1 to n do begin write(‘a[‘, i, ‘] = ‘); readln(a[i]); end; max:=a[1]; for i:=1 to n do if tich(a[i])>tich(a[1]) then max:=a[i]; write(‘so co tich lon nhat: ‘,max); readln; end.
program tich_chuso;
uses crt;
var A:array[1..1000] of integer;
n,i,max,ptu:integer;
function tich(k:integer):integer;
begin
while k>0 do
begin
tich:=tich*(n mod 10);
n:=n div 10;
end;
end;
begin
clrscr;
write(‘Nhap so luong: ‘); readln(n);
max:=0; ptu:=0;
for i:=1 to n do
begin
write(‘A[‘,i,’]= ‘); readln(A[1]);
if tich(A[i])>=max then
begin
max:=tich(A[i]);
ptu:=A[i];
end;
end;
write(ptu);
readln;
end.
program tich;
uses crt;
var n, i: byte;
a: array[1..250] of integer;
max:Integer;
function tich(a: integer): integer;
var s: string;
x, i: byte;
begin
str(a, s); tich:=1;
for i:=1 to length(s) do
begin
val(s[i], x, i);
tich:=tich*x;
end;
end;
begin
clrscr;
write(‘n = ‘); readln(n);
for i:=1 to n do
begin
write(‘a[‘, i, ‘] = ‘);
readln(a[i]);
end;
max:=a[1];
for i:=1 to n do
if tich(a[i])>tich(a[1]) then max:=a[i];
write(‘so co tich lon nhat: ‘,max);
readln;
end.