Quick actions

cmd+k|ctrl+k

Navigation

Languages

lab4(80)

Snippet info

Language

Cpp

Visibility

public

Author

misha127831

Created

2018-10-30T06:43:37Z

Updated

2018-11-06T06:37:53Z

#include <iostream>
#include <math.h>
using namespace std;

int main() {
    double x1,y1,x2,y2;
    cin >> x1;
    cin >> y1;
    cin >> x2;
    cin >> y2;
    
    double m1 = sqrt(x1*x1+y1*y1);
    double m2 = sqrt(x2*x2+y2*y2);
    
    if (m1<m2) {
        cout << "A ближе" << endl;
    }
    else {
        cout << "B ближе" << endl;
        return 0;
    }
    return 0;
}
INFO