From 00bbedd83cd7f0db93b41d29b25216fa0e535f81 Mon Sep 17 00:00:00 2001 From: yenru0 Date: Sat, 23 Mar 2024 18:14:53 +0900 Subject: [PATCH] complete 10101 --- zeta_cpp/completed/10101.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 zeta_cpp/completed/10101.cpp diff --git a/zeta_cpp/completed/10101.cpp b/zeta_cpp/completed/10101.cpp new file mode 100644 index 0000000..03b014c --- /dev/null +++ b/zeta_cpp/completed/10101.cpp @@ -0,0 +1,29 @@ +#include + +using namespace std; + +int main() { + int sides[3]; + + for (int i = 0; i < 3; i++) { + cin >> sides[i]; + } + + if (sides[0] + sides[1] + sides[2] != 180) { + cout << "Error"; + return 0; + } + + if (sides[0] == 60 and sides[1] == 60 and sides[2] == 60) { + cout << "Equilateral"; + return 0; + } + if (sides[0] == sides[1] or sides[0] == sides[2] or sides[1] == sides[2]) { + cout << "Isosceles"; + return 0; + } + + cout << "Scalene"; + return 0; + +} \ No newline at end of file