Free Pascal 错误!program exa2012_7;var a,b,c:real;beginread(a,b,c);if a+b>c and b+c>a and a+c>bthen if a*a+b*b=c*c or a*a+c*c=b*b or b*b+c*c=a*a]then write('It is a right triangle.')else write('It is a normal triangle.')else write('It can not be a
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/21 01:42:36
![Free Pascal 错误!program exa2012_7;var a,b,c:real;beginread(a,b,c);if a+b>c and b+c>a and a+c>bthen if a*a+b*b=c*c or a*a+c*c=b*b or b*b+c*c=a*a]then write('It is a right triangle.')else write('It is a normal triangle.')else write('It can not be a](/uploads/image/z/10137253-13-3.jpg?t=Free+Pascal+%E9%94%99%E8%AF%AF%21program+exa2012_7%3Bvar+a%2Cb%2Cc%3Areal%3Bbeginread%28a%2Cb%2Cc%29%3Bif+a%2Bb%3Ec+and+b%2Bc%3Ea+and+a%2Bc%3Ebthen+if+a%2Aa%2Bb%2Ab%3Dc%2Ac+or+a%2Aa%2Bc%2Ac%3Db%2Ab+or+b%2Ab%2Bc%2Ac%3Da%2Aa%5Dthen+write%28%27It+is+a+right+triangle.%27%29else+write%28%27It+is+a+normal+triangle.%27%29else+write%28%27It+can+not+be+a)
Free Pascal 错误!program exa2012_7;var a,b,c:real;beginread(a,b,c);if a+b>c and b+c>a and a+c>bthen if a*a+b*b=c*c or a*a+c*c=b*b or b*b+c*c=a*a]then write('It is a right triangle.')else write('It is a normal triangle.')else write('It can not be a
Free Pascal 错误!
program exa2012_7;
var a,b,c:real;
begin
read(a,b,c);
if a+b>c and b+c>a and a+c>b
then if a*a+b*b=c*c or a*a+c*c=b*b or b*b+c*c=a*a]
then write('It is a right triangle.')
else write('It is a normal triangle.')
else write('It can not be a triangle.')
end;
end.
编写程序,输入3个数,分别代表三角形的三条边长,判断能否组成三角形(triangle),如果能,判断是直角三角形(right triangle)还是普通三角形(normal triangle),在屏幕上输出判断结果.
Free Pascal 错误!program exa2012_7;var a,b,c:real;beginread(a,b,c);if a+b>c and b+c>a and a+c>bthen if a*a+b*b=c*c or a*a+c*c=b*b or b*b+c*c=a*a]then write('It is a right triangle.')else write('It is a normal triangle.')else write('It can not be a
判断的式子要加括号……
例如:a+b>c→(a+b>c);a*a+b*b=c*c→(a*a+b*b=c*c).
明白了么?
var a,b,c:real;
begin
read(a,b,c);
if(a+b>c)and(b+c>a)and(a+c>b)
then if(a*a+b*b=c*c)or(a*a+c*c=b*b)or(b*b+c*c=a*a)
then write('It is a right triangle.')
else write('It is a normal triangle.')
else write('It can not be a triangle.')
end.