60分
查看原帖
60分
467057
wangjiaying20楼主2021/3/20 17:51

求各位大佬康康哪里不对

山上的笋都被我夺完了

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b,c;
    cin>>a>>b>>c;
    if(a>c)swap(a,c);
    if(b>c)swap(b,c);
    if(a>c)swap(a,c);
    if(b>c)swap(b,c);
    if(a+b<=c){cout<<"Not triangle";return 0;}
    if(pow(a,2)+pow(b,2)==pow(c,2))cout<<"Right triangle"<<endl;
    if(pow(a,2)+pow(b,2)>pow(c,2))cout<<"Acute triangle"<<endl;
    if(pow(a,2)+pow(b,2)<pow(c,2))cout<<"Obtuse triangle"<<endl;
    if(a==b||a==c||b==c)cout<<"Isoscelos triangle"<<endl;
    if(a==b&&b==c)cout<<"Equilateral triangle"<<endl;
    return 0;
}
2021/3/20 17:51
加载中...