Hi guys, I'm really new to this. The problem is that I have to write a int function to get the lowest number out of 5 numbers, and the another float function to call the above function and only get the average of the highest 4 numbers in the function.
int min5(int a, int b, int c, int d, int e)
{
min(a, min(b, min(c, min(d, e))));
}
int ave5(int a, int b, int c, int d, int e)
{
int minimum = min5(a,b,c,d,e);
float average = 0;
if (a != minimum) average += a;
if (b != minimum) average += b;
if (c != minimum) average += c;
if (d != minimum) average += d;
if (e != minimum) average += e;
return average/4.f;
}