#include int isAbove( int x, /* coordinates of test point */ int y, int x0, /* coordinates of one point on the line */ int y0, int x1, /* coordinates of another point on line */ int y1) { float slope; float yval; int out; slope = y1 - y0; slope = slope / (x1 - x0); yval = y0 + slope * (x - x0); if (yval > y) out = 0; else out = 1; return(out); } main() { printf("%d\n", isAbove(50, 53, 0, 0, 100, 100)); printf("%d\n", isAbove(50, 47, 0, 0, 100, 100)); printf("%d\n", isAbove(50, 52, 0, 100, 100, 0)); printf("%d\n", isAbove(50, 48, 0, 100, 100, 0)); }