program matiks;
uses wincrt;
type
arin=array [1..100] of integer;
function min(b:arin;m,n:integer):integer;
var
i,j,domp:integer;
begin
domp:=b[1];
for i:=1 to m do
begin
for j:= 1 to n do
begin
if domp>=b[j] then
domp:=b[j];
end;
end;
min:=domp;
end;
var
a:arin;
i,j,m,n,x,domp:integer;
begin
write('masukan jumlah baris : ');readln(n);
write('masukan jumlah kolom : ');readln(m);
for i:=1 to m do
begin
for j:= 1 to n do
begin
write('a[',i,',',j,'] : ');readln(a[j]);
end;
end;
domp:=min(a,m,n);
writeln('jadi bilangan bilangan terkecil adalah ',domp);
end.
uses wincrt;
type
arin=array [1..100] of integer;
function min(b:arin;m,n:integer):integer;
var
i,j,domp:integer;
begin
domp:=b[1];
for i:=1 to m do
begin
for j:= 1 to n do
begin
if domp>=b[j] then
domp:=b[j];
end;
end;
min:=domp;
end;
var
a:arin;
i,j,m,n,x,domp:integer;
begin
write('masukan jumlah baris : ');readln(n);
write('masukan jumlah kolom : ');readln(m);
for i:=1 to m do
begin
for j:= 1 to n do
begin
write('a[',i,',',j,'] : ');readln(a[j]);
end;
end;
domp:=min(a,m,n);
writeln('jadi bilangan bilangan terkecil adalah ',domp);
end.
No comments:
Post a Comment