Quick actions

cmd+k|ctrl+k

Navigation

Languages

lab4(111)

Snippet info

Language

Cpp

Visibility

public

Author

andrusus.korotkovus

Created

2018-10-23T17:14:20Z

Updated

2018-10-23T17:14:20Z

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


int main() {
    int a, b, c, d, e;
    cin>>a>>b>>c>>d;
    if(a == d){
        cout<<a<<'='<<d;
    } else if(b == d) {
        cout<<b<<'='<<d;
    } else if(c == d) {
        cout<<c<<'='<<d;
    } else {
        e = max(max((d-c),(d-a)),(d-b));
        cout<<e;
    }
    return 0;
}
INFO