Respuesta :
Solution:
The definition of a function max that has three int parameters and returns the largest is given bellow:
def max(x,y,z):
if (x>z and x>y):
return (x)
elif (y>x and y>z):
return y
else:
return z
Thus this is required right answer.
Answer:
int max(int x, int y, int z){
if(x > y && x > z)
return x;
else if(y > x && y > z)
return y;
else
return z;
}
Explanation:
I am going to write a c function for this.
The arguments are the values, and it is a int function because it returns an integer. So
The if clause is used to verify the largest value.
int max(int x, int y, int z){
if(x > y && x > z)
return x;
else if(y > x && y > z)
return y;
else
return z;
}