// simplified chapter1_1.c using pythag function // #include #include double pythag( double a, double b) { return sqrt( a*a + b*b); } int main(void) { double x1 = 1.1, y1 = 5.5, x2 = 4.4, y2 = 7.7, d; d = pythag( x2-x1, y2-y1); printf( "d = %g\n", d); return 0; }