勾股定理的方法 算出各边的距离
#include<iostream.h>
void main()
{ float a,b,c,t;
cout<<"请输入三边的长度:"
cin>>a>>b>>c;
if(a<b) {t=a;a=b;b=t;}
if(a<c) {t=a;a=c;c=t;}
if(a*a==b*b+c*c) cout<<"能构成直角三角形\n";
else cout<<"不能构成直角三角形\n";
} #include<iostream.h>
v