Pascal的~
兩個測資都是把right輸成了acute~
求助~感謝~
var a,b,c,t:longint;
procedure swap(var a,b:longint);
var t:longint;
begin
t:=a;
a:=b;
b:=t;
end;
begin
readln(a,b,c);
if a>c then swap(a,b);
if b>c then swap(b,c);
if (sqr(b)+sqr(a)-sqr(c))>0 then writeln('acute triangle')
else if (sqr(b)+sqr(a)-sqr(c))<0 then writeln('obtuse triangle')
else writeln('right triangle');
end.
var a,b,c,t:longint;
procedure swap(var a,b:longint);
var t:longint;
begin
t:=a;
a:=b;
b:=t;
end;
begin
readln(a,b,c);
if a>b then swap(a,b);
if b>c then swap(b,c);
if a>b then swap(a,b)
if (sqr(b)+sqr(a)-sqr(c))>0 then writeln('acute triangle')
else if (sqr(b)+sqr(a)-sqr(c))<0 then writeln('obtuse triangle')
else writeln('right triangle');
end.