#include <cstdlib> #include <iostream> #include <string> #include <cmath> #include "circ_area.h" #include "ring_area.h" using namespace std; /*-------- signature: main: void -> int purpose: testing program for the function ring_area examples: when run, this should output to the screen: testing ring_area: true's should mean passed: --------------------------------------- ...followed by each testing call, hopefully followed by true to show it passed by: funct_play last modified: Fri Oct 14 12:19:10 PDT 2016 --------*/ int main() { cout << boolalpha; cout << endl; cout << "testing ring_area: true's should mean passed: " << endl; cout << "---------------------------------------" << endl; cout << "(abs(ring_area(10, 1) - (314.159 - 3.14159)) < .001): " << (abs(ring_area(10, 1) - (314.159 - 3.14159)) < .001) << endl; cout << "(abs(ring_area(2, 1) - (circ_area(2) - 3.14159)) < .001): " << (abs(ring_area(2, 1) - (circ_area(2) - 3.14159)) < .001) << endl; cout << endl; return EXIT_SUCCESS; }