You are viewing a single comment's thread. Return to all comments →
#include <bits/stdc++.h> using namespace std; int greatest(int a, int b, int c, int d){ int result; result = a>b && a>c && a>d ? a : (b>a && b>c && b>d ? b : ( c>a && c>b&& c>d ? c : d ) ) ; return result; } int main(){ int a,b,c,d, res; cin>>a>>b>>c>>d; res = greatest(a,b,c,d); cout<<res<<endl; return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Functions
You are viewing a single comment's thread. Return to all comments →