Предмет: Информатика, автор: katenartntz

Подробное решение, пожалуйста?

Приложения:

Ответы

Автор ответа: zakr10p6bbzt
0

#define _CRT_SECURE_NO_WARNINGS

#include <iostream>

#include <vector>

#include <algorithm>

#include <utility>

#include <set>

#include <cmath>

using namespace std;

int pow(int a) { return a * a;}


signed main() {

   setlocale(0, "RUS");

   vector <int> trangle(3);

   for (int i = 0; i < 3; ++i) cin >> trangle[i];

   sort(trangle.begin(), trangle.end());

   if (pow(trangle[2]) == pow(trangle[1]) + pow(trangle[0]))

       cout << "Прямоугольный";

   else if (pow(trangle[2]) > pow(trangle[1]) + pow(trangle[0]))

       cout << "Тупоугольный";

   else

       cout << "Остроугольный";

}



---



#define _CRT_SECURE_NO_WARNINGS

#include <iostream>

#include <vector>

#include <algorithm>

#include <utility>

#include <set>

#include <cmath>

using namespace std;

int pow(int a) { return a * a;}


signed main() {

   setlocale(0, "RUS");

   int x, y;

   cin >> x >> y;

   if (x > 0 && y > 0) cout << "I четверть";

   else if (x > 0 && y < 0) cout << "II четверть";

   else if (x < 0 && y < 0) cout << "III четверть";

   else cout << "IV четверть";

}


Похожие вопросы
Предмет: Химия, автор: improyura
Предмет: История, автор: leedashalee2009