Пример №157

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> #include "cmath" using namespace std; int main () { int A1,A2,B1,B2,C1,C2,X; cin >> A1 >> B1 >> C1 >> A2 >> B2 >> C2; if (A1*A2==-1) { cout << "Перпендикулярны" << endl; } else if (A1==A2) { cout << "Параллельны" << endl; } else { X = (A1*A2 + B1*B2)/(sqrt((pow(A1,2) + pow(B1,2)))*(sqrt((pow(A2,2) + pow(B2,2)))) ); cout << " угол равен cosX. X = " << X << endl; } return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines