Solved
Compile problem!!
Posted on 2007-10-20
It's just a little problem,but I can't find it out.
The program is here:
#include <stdio.h>
int main(){
float a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;
//a,b,c,d,e,f,g,h are numbers of coordinate.
printf("Please input 4 pairs of coordinates.\n\n");
printf("Point A (x y):");
scanf("%d%d",&a,&b);
printf("Point B (x y):");
scanf("%d%d",&c,&d);
printf("Point C (x y):");
scanf("%d%d",&e,&f);
printf("Point D (x y):");
scanf("%d%d",&g,&h);
i = sqrt((a-c)*(a-c)+(b-d)*(b-d)) //i is line AB
j = sqrt((a-e)*(a-e)+(b-f)*(b-f)) //j is line AC
k = sqrt((c-e)*(c-e)+(d-f)*(d-f)) //k is line BC
l = (i+j+k)/2
m = SQRT((l-i)(l-j)(l-k)(l))//m is area of ABC
n = sqrt((a-g)*(a-g)+(b-h)*(b-h)) //n is line AD
o = sqrt((g-c)*(g-c)+(h-d)*(h-d)) //o is line BD
p = sqrt((g-e)*(g-e)+(h-f)*(h-f)) //p is line CD
q = (n+i+o)/2
r = SQRT((q-n)(q-i)(q-o)(q))//r is area of ABD
s = (n+j+p)/2
t = SQRT((s-n)(s-j)(s-p)(s))//t is area of ACD
u = (k+o+p)/2
v = SQRT((u-k)(u-p)(u-o)(u))//v is area of BCD
if ( m = r + t + v )
printf("The point D (%.3fg,%.3fh)lies inside triangle ABC.\n");
if (m < r + t + v )
printf("The point D (%.3fg,%.3fh)lies outside triangle ABC.\n");
It's just a syntax error,can someone help?