eolymp
bolt
Try our new interface for solving problems
Problems

Maximum among four numbers

published at 2/10/24, 9:36:25 pm

include <iostream>

using namespace std; int main() { long long a, b, c, d; cin>>a>>b>>c>>d; if (a >= b && a >= c && a >= d) { cout<<a; } else if (b >= a && b >= c && b >= d) { cout<<b; } else if (c >= a && c >= b && c >= d) { cout<<c; } else { cout<<d; } }