It accepts three parameters x,y, and z, each of type double and returns a value of type double.
A local variable max is used to hold the maximum of the three given numbers. Initially, the larger of x and y is stored in variable max using an if-else statement. Then the value of z is assigned to max if it is greater than max. Finally, the value of max is returned. A function to return the maximum of three numbers is given below.
double max3(double x,double y,double z);
void main ()
printf("Enter the value of x,y,z:\n");
i= max3(a,b,c) ;
double max3(double x,double y,double z)
if (x > y)
max = x;
else max = y;
if (z > max)
max = z;