Code:

#include<stdio.h>
#include<math.h>
int position(int x1,int y1,int x2,int y2,int x3,int y3);
float distance(int a1,int b1,int a2,int b2);
float area(int x1,int y1,int x2,int y2,int x3,int y3);
main()
{
int x1,y1, x2, y2,x3,y3;
float distance(int a1,int b1,int a2,int b2);
printf("Enter three points cooredinates(x1,y1),(x2,y2),(x3,y3): ");
scanf("(%d,%d),(%d,%d),(%d,%d)",&x1,&y1,&x2,&y2,&x3,&y3);
float area(int x1,int y1,int x2,int y2,int x3,int y3);
printf("position : %d",position( x1, y1, x2, y2, x3, y3));
return 0;
}
int position(int x1,int y1,int x2,int y2,int x3,int y3)
{
int x,y,p,q,r,s,t;
printf("Enter the point's cooredinates (x,y): ");
scanf(" (%d,%d)",&x,&y);
p = area(x1, y1, x2, y2, x3, y3);
q = area(x, y, x2, y2, x3, y3);
r = area(x1, y1, x, y, x3, y3);
s = area(x1, y1, x2, y2, x, y);
t = r+q+s;
if ( p == t)
{
return 1;
}
else
{
return 0;
}
}
float area(int j1,int k1,int j2,int k2,int j3,int k3)
{
float a,l,b,h,p;
l = distance(j1,k1,j2,k2);
b = distance(j2,k2,j3,k3);
h = distance(j1,k1,j3,k3);
p = (l+b+h)/2;
a = sqrt(p*(p - l)*(p - b)*(p - h));
return(a);
}
float distance(int a1,int b1,int a2,int b2)
{
float s;
s = sqrt((a2-a1)*(a2-a1)*(b2-b1)*(b2-b1));
return(s);
}