Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
1929 | 莫业祁 | 11判断三角形 | C++ | Compile Error | 0 MS | 0 KB | 505 | 2023-12-02 16:57:03 |
# include<iostream> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; a=max(a,b,c); c=min(a,b,c); if(a>=b+c){ cout<<"No"; } elif(a=b=c){ cout<<"Equilateral Triangle"; } elif(a=b||b=c||a=c){ cout<<"Iscosceles Triangle"; } elif(a*a=b*b+c*c){ cout<<"Right Traingle"; } else{ cout<<"Simple Triangle"; } return 0; }
Main.cc: In function 'int main()': Main.cc:11:19: error: 'elif' was not declared in this scope elif(a=b=c){ ^ Main.cc:11:20: error: expected ';' before '{' token elif(a=b=c){ ^ Main.cc:14:25: error: lvalue required as left operand of assignment elif(a=b||b=c||a=c){ ^ Main.cc:14:28: error: expected ';' before '{' token elif(a=b||b=c||a=c){ ^ Main.cc:17:17: error: lvalue required as left operand of assignment elif(a*a=b*b+c*c){ ^ Main.cc:17:26: error: expected ';' before '{' token elif(a*a=b*b+c*c){ ^ Main.cc:20:9: error: 'else' without a previous 'if' else{ ^ In file included from /usr/include/c++/4.8.2/bits/char_traits.h:39:0, from /usr/include/c++/4.8.2/ios:40, from /usr/include/c++/4.8.2/ostream:38, from /usr/include/c++/4.8.2/iostream:39, from Main.cc:1: /usr/include/c++/4.8.2/bits/stl_algobase.h: In instantiation of 'const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': Main.cc:6:16: required from here /usr/include/c++/4.8.2/bits/stl_algobase.h:263:26: error: '__comp' cannot be used as a function if (__comp(__a, __b)) ^ /usr/include/c++/4.8.2/bits/stl_algobase.h: In instantiation of 'const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]': Main.cc:7:16: required from here /usr/include/c++/4.8.2/bits/stl_algobase.h:242:26: error: '__comp' cannot be used as a function if (__comp(__b, __a)) ^