Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
638 曾浩森 11判断三角形 C++ Compile Error 0 MS 0 KB 857 2023-01-12 15:01:20

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int a,b,c=0,d; cin>>a>>b>>c; if(a>b&&a>c){ if(b+c>a){ b=1; } else{ cout<<"No"; } } if(c>b&&c>a){ if(a+b>c){ d=1; } else{ cout<<"N0"; } } if(b>a&&b>c){ if(a+c>b){ c=1; } else{ cout<<"No"; } } if(a==c&&a==b){ cout<<"Equilateral Tringel";} if(c=1){ if(a==c||a==b||b==c){ cout<<"Isosceles Triangle"; } else if(a*a+b*b=c*c||a*a+c*c=b*b||b*b+c*c=a*a){ cout<<"Right Triangle"; } else{ cout<<"Simple Triangle"; } } }


Run Info:

Main.cc: In function 'int main()':
Main.cc:35:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
     if(c=1){
           ^
Main.cc:39:50: error: lvalue required as left operand of assignment
         else if(a*a+b*b=c*c||a*a+c*c=b*b||b*b+c*c=a*a){
                                                  ^