用pascal判断三条边可否围成三角形vara:array[1..5,1..3]of integer;n,i,j,m,t:integer;beginwhile not eof dobeginfor t:=1 to 5 do readln(a[t,1],a[t,2],a[t,3]);m:=0;for t:=1 to 5 dobeginn:=a[t,1];i:=a[t,2];j:=a[t,3];if ((n+i)>j)and((n+j)>i)and
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/18 04:27:31
用pascal判断三条边可否围成三角形vara:array[1..5,1..3]of integer;n,i,j,m,t:integer;beginwhile not eof dobeginfor t:=1 to 5 do readln(a[t,1],a[t,2],a[t,3]);m:=0;for t:=1 to 5 dobeginn:=a[t,1];i:=a[t,2];j:=a[t,3];if ((n+i)>j)and((n+j)>i)and
用pascal判断三条边可否围成三角形
var
a:array[1..5,1..3]of integer;
n,i,j,m,t:integer;
begin
while not eof do
begin
for t:=1 to 5 do readln(a[t,1],a[t,2],a[t,3]);
m:=0;
for t:=1 to 5 do
begin
n:=a[t,1];
i:=a[t,2];
j:=a[t,3];
if ((n+i)>j)and((n+j)>i)and((i+j)>n) then n:=n+1;
end;
writeln(n);
end;
end.
用pascal判断三条边可否围成三角形vara:array[1..5,1..3]of integer;n,i,j,m,t:integer;beginwhile not eof dobeginfor t:=1 to 5 do readln(a[t,1],a[t,2],a[t,3]);m:=0;for t:=1 to 5 dobeginn:=a[t,1];i:=a[t,2];j:=a[t,3];if ((n+i)>j)and((n+j)>i)and
你最后应该用m来计数吧
then m:=m+1;
writeln(m);