We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
int max_of_four(int a, int b, int c, int d){
int e[]={a,b,c,d};
int n=sizeof(e)/sizeof(e[0]);
sort(e,e+n);
int g=e[3];
return g;
}
int main() {
int a,b,c,d;
cin>>a>>b>>c>>d;
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int maxi =max_of_four( a, b, c, d);
cout<
Cookie support is required to access HackerRank
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 →
include
include
include
include
include
using namespace std;
int max_of_four(int a, int b, int c, int d){ int e[]={a,b,c,d}; int n=sizeof(e)/sizeof(e[0]); sort(e,e+n); int g=e[3]; return g;
}
int main() { int a,b,c,d; cin>>a>>b>>c>>d; /* Enter your code here. Read input from STDIN. Print output to STDOUT */
int maxi =max_of_four( a, b, c, d); cout<