Wrong Answer
Code
#include <iostream>
using namespace std;
int main()
{
int a,b,c,d,e,f,g;
cin>>a>>b>>c;
d=a*a;
e=b*b;
f=c*c;
g=d+e;
if (a==b && b==c && a==c)
{
cout<<"Equilateral";
}
else if ((a!=b && b==c && a!=c) ||(a!=c && a==b && b!=c) ||(b!=c && a==c && a!=b))
{
cout<<"Isosceles";
}
else if (g==f)
{
cout<<"Scalene";
}
else
{
cout<<"Not a triangle";
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1108 Triangle Triangle Triangle!!!
- Contest
- Brain Booster #8
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-02-17 15:41:12
- Judged At
- 2025-02-17 15:41:12
- Judged By
- Score
- 12
- Total Time
- 1ms
- Peak Memory
- 536.0 KiB