You are viewing a single comment's thread. Return to all comments →
using namespace std;
int max_of_four(int a, int b, int c, int d)
{
int arr[4] = {a,b,c,d}; int largest = arr[0]; for(int i =1; i<4; i++) { if(largest < arr[i]) largest = arr[i]; } return largest;
}
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 →
using namespace std;
int max_of_four(int a, int b, int c, int d)
{
}