Задание112.R

Run Settings
LanguageC++
Language Version
Run Command
#include "pch.h" #include <iostream> #include <cmath> using namespace std; int main() { setlocale(LC_ALL, "Russian"); double x1, x2, x3, x4, y1, y2, y3, y4, a, b, c, d; cout << "Введите координаты четырёх точек:"<<"\n"; cin >> x1 >> y1; cin >> x2 >> y2; cin >> x3 >> y3; cin >> x4 >> y4; a = sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2)); b = sqrt(pow((x3 - x2), 2) + pow((y3 - y2), 2)); c = sqrt(pow((x4 - x3), 2) + pow((y4 - y3), 2)); d = sqrt(pow((x4 - x1), 2) + pow((y4 - y1), 2)); cout << "Длина стороны a:" << a << "\n"; cout << "Длина стороны b:" << b << "\n"; cout << "Длина стороны c:" << c << "\n"; cout << "Длина стороны d:" << d << "\n"; if (a == c, b == d) { cout << "Данные координаты точек являются вершинами параллелограмма!" << "\n"; } else { cout << "Данные координаты точек НЕ являются вершинами параллелограмма!" << "\n"; } return 0; system("pause"); }
Editor Settings
Theme
Key bindings
Full width
Lines