Quick actions

cmd+k|ctrl+k

Navigation

Languages

task 157

Snippet info

Language

Cpp

Visibility

public

Author

niktyutenko

Created

2018-10-17T10:10:27Z

Updated

2018-10-17T10:11:10Z

#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;
}
INFO