You are viewing a single comment's thread. Return to all comments →
#include<bits/stdc++.h> using namespace std; int max(int a, int b, int c, int d) { int max = 0; int n[]={a,b,c,d}; for(int i=0;i<=4;i++) { if (n[i]>max) max=n[i]; } return max; } int main() { int a=0,b=0,c=0,d=0; cin>>a; cin>>b; cin>>c; cin>>d; cout<<max(a,b,c,d); }
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 →