pascal以下的有何问题?具体点。。。(判断三角形的)
programpanduansjiao;vara,b,c:real;beginwrite('a=');readln(a);write('b=');readln(b);wr...
program panduansjiao;
var a,b,c:real;
begin
write('a=');readln(a);
write('b=');readln(b);
write('c=');readln(c);
if a+b>c and a+c>b and b+c>a
then
if a*a+b*b=c*c or a*a+c*c=b*b or b*b+c*c=a*a
then
writeln('zhijiaosanjiaoxing')
else
if a*a+b*b>c*c or a*a+c*c>b*b or b*b+c*c>a*a
then writeln('rijiaosanjiaoxing')
else writeln('dunjiaosanjiaoxing')
else writeln('bushisanjiaoxing');
end. 展开
var a,b,c:real;
begin
write('a=');readln(a);
write('b=');readln(b);
write('c=');readln(c);
if a+b>c and a+c>b and b+c>a
then
if a*a+b*b=c*c or a*a+c*c=b*b or b*b+c*c=a*a
then
writeln('zhijiaosanjiaoxing')
else
if a*a+b*b>c*c or a*a+c*c>b*b or b*b+c*c>a*a
then writeln('rijiaosanjiaoxing')
else writeln('dunjiaosanjiaoxing')
else writeln('bushisanjiaoxing');
end. 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询