- #1
TheKracken
- 356
- 7
I am trying to make it computer a side of a right triangle
here is my code?
double x1-1, y1=5, x2=4, y2=7;
side_1, side2, distance;
side_1 - x2 - x1;
side_2 = y2- y1;
distance = sqrt(side_1*side_1 + side_2*side_2);
printff(The distance between the two points is "
"%5.2f\n",distance);
return 0;
}
My errors are apparently
A namespace does not directly contain members such as fields or members
and
Type or namespace definition, or end-of-file expected
Could anybody help me?
here is my code?
double x1-1, y1=5, x2=4, y2=7;
side_1, side2, distance;
side_1 - x2 - x1;
side_2 = y2- y1;
distance = sqrt(side_1*side_1 + side_2*side_2);
printff(The distance between the two points is "
"%5.2f\n",distance);
return 0;
}
My errors are apparently
A namespace does not directly contain members such as fields or members
and
Type or namespace definition, or end-of-file expected
Could anybody help me?