Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
67331 石依灵 11判断三角形 C++ Compile Error 0 MS 0 KB 1030 2024-03-16 13:50:43

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ long long a,b,c; cin>>a>>b>>c; if(a+b>c && a+c>b && b+c>a){ #include<bits/stdc++.h> using namespace std; int main(){ long long a,b,c; cin>>a>>b>>c; if(a+b>c && a+c>b && b+c>a){ if(a==b && b==c){ cout<<"Equilateral Triangle"; } else if(a==b || b==c || a==c){ cout<<"Isosceles Triangle"; } else if(a*a+b*b==c*c || a*a+c*c==b*b || c*c+b*b==a*a){ cout<<"Right Triangle"; } else{ cout<<"No"; } } cout<<"Simple Triangle"; return 0; } if(a==b && b==c){ cout<<"Equilateral Triangle"; } else if(a==b || b==c || a==c){ cout<<"Isosceles Triangle"; } else if(a*a+b*b==c*c || a*a+c*c==b*b || c*c+b*b==a*a){ cout<<"Right Triangle"; } else{ cout<<"No"; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:11: error: a function-definition is not allowed here before '{' token
 int main(){
           ^
Main.cc:43:2: error: expected '}' at end of input
  }
  ^
Main.cc:43:2: error: expected '}' at end of input