Ok. Ive come this far.
But I still dont know how to define it. Do you mean I should move the code to that is in between the brackets to after main? Can you copy and paste and show me how to do that?
#include <stdio.h>
float mean (float x, float y)
{
float result;
result = (x+y)/2;
return result;
}
int main( )
{
double result;
result = mean( 1.0, 3.0 );
printf("%f\n", result);
getchar();
return 0;
}