Home>

The following error message has occurred.

cg1.c: 11: 1: error: function definition is not allowed here
{
^ ^
1 error generated.

### Applicable source code

Enter the language name here

include include

int main (void) {
double chokusen (
double * x, double * y, double * z,
double a, double b, double c, double d,
double x0, double y0, double z0,
double f, double g, double h)
{
double denon, t;
denon = a * f + b * g + c * h;
if (fabs (denon)<1e-7) {/ * Straight lines and planes are parallel * /
return 99999.9;
}
else {
t =-(a * x0 + b * y0 + c * z0 + d)/denon;
* x = x0 + f * t;
* y = y0 + g * t;
* z = z0 + h * t;
return t;/* If the value of t is less than 0 and greater than 1, the intersection exists
Does not exist * /
}
}
}

`` ```