Quick actions

cmd+k|ctrl+k

Navigation

Languages

1.3

Snippet info

Language

Cpp

Visibility

public

Author

zvat.333333

Created

2018-10-07T15:48:24Z

Updated

2018-10-07T15:48:24Z

#include <iostream>
#include <math.h>
using namespace std;
int a, b, c, d;
double x;

int main() {
    cout << "Введите A B C D"<<endl;
    cin >> a>>b>>c>>d;
    if (a==0 or d==0)
    {
         cout<<"\nError";
    }
    else 
    {
        x = (a*d + b*c)/(a*d);
        cout <<x;
    }
    return 0;
}
INFO