Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
109570 李朋秦 11判断三角形 C++ Compile Error 0 MS 0 KB 457 2025-02-09 15:21:15

Tests(0/0):


Code:

#include<cstdio> int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); if((a+b>c)&&(abs(a-b>c))){ if((a*a+b*b==c*c)||(a*a+c*c==b*b)||(c*c+b*b==a*a)){ printf("Right Triangle"); }else if((a==b)&&(b==c)){ printf("Equilateral Triangle"); }else if((a==b)||(a==c)||(a==c)){ printf("Isosceles Triangle"); }else{ printf("Simple Triangle"); } }else{ printf("NO"); } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:27: error: 'abs' was not declared in this scope
     if((a+b>c)&&(abs(a-b>c))){
                           ^
Main.cc:4:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d%d",&a,&b,&c);
                             ^