문제
풀이
#include <iostream>
using namespace std;
int main() {
int x, y, z;
int sum = 0;
cin >> x >> y >> z;
sum = x + y + z;
if (sum == 180) {
if (x == 60 && y == 60 && z == 60)
cout << "Equilateral";
else if (x == y || x == z || y == z)
cout << "Isosceles";
else
cout << "Scalene";
}
else
cout << "Error";
return 0;
}
'백준 > 기하' 카테고리의 다른 글
14215: 세 막대 / C++ (0) | 2023.03.21 |
---|---|
5073: 삼각형과 세 변 / C++ (0) | 2023.03.21 |
9063: 대지 / C++ (0) | 2023.03.21 |
15894: 수학은 체육과목 입니다 / C++ (0) | 2023.03.21 |
3009: 네 번째 점 / C++ (0) | 2023.03.21 |