Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Liza1.cpp: определяет точку входа для консольного приложения.
- //
- #include <math.h>
- #include <iostream>
- using namespace std;
- int main()
- {
- int input[3];
- int a, b, c;
- cin >> input[0] >> input[1] >> input[2];
- for (int i = 0; i < 2; i++) {
- for (int j = 0; j < 3 - i - 1; j++) {
- if (input[j] < input[j + 1]) {
- int temp = input[j];
- input[j] = input[j + 1];
- input[j + 1] = temp;
- }
- }
- }
- for (int i = 0; i < 3; i++) {
- cout << input[i] << " ";
- }
- cout << endl;
- a = input[0];
- b = input[1];
- c = input[2];
- if (a >= b + c) {
- cout << "Impisible" << endl;
- }
- else if (a*a > b*b + c*c) {
- cout << "TUPOI" << endl;
- }
- else if (a*a == b*b + c*c) {
- cout << "PRYAMOI" << endl;
- }
- else if (a*a < b*b + c*c) {
- cout << "OSTRYI" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement