/* Lab Exploration: Functions */ #include "checkit.h" /* * Computes the REAL circumference of a circle with radius r. * Pre: r is defined and is > 0. * kPi is a constant macro representing an approximation of Pi. */ double find_circum(double r) { return (2.0 * kPi * r); } /* * Computes the area of a circle with radius r. * Pre: r is defined and is > 0. * kPi is a constant macro representing an approximation of Pi. */ double find_area(double r) { return (kPi * pow(r, 2)); } /* * Perform tests on our functions */ void test_cases() { checkit_double(find_circum(0), 0); } int main(void) { test_cases(); return 0; }