Please send questions to
st10@humboldt.edu .
/*--------------------------------------------------
created by smtuttle at Tue Oct 19 14:15:27 PDT 2010
--------------------------------------------------*/
#include <iostream>
#include <cmath>
#include "circ_area.h"
using namespace std;
/*--------------------------------------------------
Contract: ring_area : double double -> double
Purpose: expects the outer radius of a ring and the radius
of the ring's "hole" -- its outer and inner
radii, if you will -- and produces the arrea
of the ring
Examples: abs(ring_area(100, 10) - 31101.8) < .1
ring_area(10, 0) == circ_area(10) - circ_area(0)
--------------------------------------------------*/
double ring_area(double outer_rad, double inner_rad)
{
return circ_area(outer_rad) - circ_area(inner_rad);
}