#include <iostream> #include <iomanip> #include <math.h> #include <cmath> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; int main(int argc, char** argv) { long double n,a,b,c; while( cin>>a>>b>>c) { if(a>b) swap(a,b); if(b>c) swap(b,c); if(a>b) swap(a,b); cout<<a<<" "<<b<<" "<<c<<endl; if(a+b>c&&b+c>a&&a+c>b){ if(a*a==b*b+c*c||b*b==a*a+c*c||c*c==a*a+b*b) { cout << "Right" <<endl; } else if(a*a<b*b+c*c&&b*b<a*a+c*c&&c*c<a*a+b*b) { cout << "Acute" <<endl; } else { cout << "Obtuse"<<endl; } } else cout<<"No"<<endl; } return 0; }
為甚麼要用 long double 呢???
為甚麼要用 long double 呢???
好用ㄚ