Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(Statics) An annulus is a cylindrical rod with a hollow center. It\'s second mom

ID: 3676581 • Letter: #

Question

(Statics) An annulus is a cylindrical rod with a hollow center. It's second moment of inertia is given by:

a.) Using this formula write a function called annulusMoment( ) that accecpts two double precision number as parameters (one for the outter radius and one for the inner radius), calculates the corresponding second moment of inertia , and displays the result.

b.) Include the following written in Exercise 5a in a working program. Make sure your function is called from main( ). Test the function by passing various data to it.

Explanation / Answer

#include <iostream>
using namespace std;
int result=0;
int annulusMoment(double r1,double r2)
{
result=3.14/4*((r2*r2*r2*r2)-(r1*r1*r1*r1));
return result;
}

int main() {
cout<<"The second moment of inertia is :"<<annulusMoment(3.4,5.1 ); // test value is 3.4 and 5.1
   return 0;
}