马鞍数问题谁能用Pascal语言编写一下(用二维数组)?
答案:1 悬赏:40 手机版
解决时间 2021-05-11 01:31
- 提问者网友:谁的错
- 2021-05-10 11:57
马鞍数问题谁能用Pascal语言编写一下(用二维数组)?
最佳答案
- 五星知识达人网友:青尢
- 2021-05-10 13:18
program maan;
var c:array[1..5,1..5] of integer;
i,n,y,s:integer;
begin
y:=0;
for n:= 1 to 5 do
for i:= 1 to 5 do
read (c[n,i]);
for n:=1 to 5 do
for i:=1 to 5 do
begin
for s:= 1 to 5 do
begin
if (c[n,i] <= c[n,s]) and (c[n,i] >= c[s,i])
then y:=y+1;
end;
if y=5 then writeln(n,',',i);
y:=0;
end;
readln;readln;
end.
var c:array[1..5,1..5] of integer;
i,n,y,s:integer;
begin
y:=0;
for n:= 1 to 5 do
for i:= 1 to 5 do
read (c[n,i]);
for n:=1 to 5 do
for i:=1 to 5 do
begin
for s:= 1 to 5 do
begin
if (c[n,i] <= c[n,s]) and (c[n,i] >= c[s,i])
then y:=y+1;
end;
if y=5 then writeln(n,',',i);
y:=0;
end;
readln;readln;
end.
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯