Прогу написаную в паскале перевести в vb
Текст проги:
- Код: Выделить всё
uses crt;
const n=4;m=4;
var a:array[1..n,1..m] of real;
max,min,maxi,mini:array[1..n] of real;
i,j,x:integer;
begin
clrscr;
randomize;
for i:=1 to n do
for j:=1 to m do read( a[i,j]);
writeln('ucxoDHbIu maccuB');
for i:=1 to n do begin
for j:=1 to m do write(a[i,j]:5:1);
writeln;
end;
for i:=1 to n do begin min[i]:=a[i,1]; max[i]:=a[i,1];
mini[i]:=1;maxi[i]:=1; end;
for i:=1 to n do
for j:=1 to m do if min[i]>a[i,j] then
begin min[i]:=a[i,j]; mini[i]:=j; end;
for i:=1 to n do
for j:=1 to m do if max[i]<a[i,j] then
begin maxi[i]:=j; max[i]:=a[i,j]; end;
writeln;
for i:=1 to n do
if mini[i]<maxi[i] then begin x:=x+1;
writeln(min[i]:3:1,' min. element ',i,'-oi stroki'); end;
if x<>n then writeln ('Takux elemenToB HeT') ;
readkey;
end.