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.
It's incredible how many different ways there are of doing this, I figured the way I did it was the most basic and what everyone would try, but you are the first to post that is doing the same way i am, here is mine:
int max_of_four(int a, int b, int c, int d){
if(a < b){
a = b;
}
if(a < c){
a = c;
}
if(a < d){
a = d;
}
return a;
}
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 →
It's incredible how many different ways there are of doing this, I figured the way I did it was the most basic and what everyone would try, but you are the first to post that is doing the same way i am, here is mine:
int max_of_four(int a, int b, int c, int d){
}