Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int main() {
- int a, b, c;
- cin >> a >> b >> c;
- if ((a >= b + c) || (b >= a + c) || (c >= a + b)) {
- cout << "impossible";
- return 0;
- }
- if ((c*c == a*a + b*b) || (a*a == b*b + c*c) || (b*b == a*a + c*c)) {
- cout << "right";
- return 0;
- }
- if (c < a) swap(c, a);
- if (c < b) swap(c, b);
- if (b < a) swap(a, b);
- if (c*c < a*a + b*b) {
- cout << "acute";
- return 0;
- } else {
- cout << "obtuse";
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement