int main()
{
int majorBase, minBase, majorHeight, minHeight, radius;
char beamType;
double pi, Ibeam, RectBeam, CylBeam;
pi = 3.14;
//gotostatement here to enter another beam selection//***
//goto to end program here?
//Introduce problem to user and prompt for beam selection
cout << "Today, you will be calculating for the inertia of a beam";
cout << "\nFor the I-beam enter I, \nfor the rectangular beam enter R, \nfor the cylindrical enter C: ";
cin >> beamType;
//based on input make if statements
if (beamType == 'I')
{
//prompt for necessary data needed for calcualtions
cout << "Please enter value for the major base: ";
cin >> majorBase;
cout << "Please enter major height value: ";
cin >> majorHeight;
cout << "Please enter minor base value: ";
cin >> minBase;
cout << "Enter minor height value: ";
cin >> minHeight;
//calculate for Inertia
Ibeam = majorBase*(majorHeight ^ 3) - minBase*(minHeight ^ 3) / 12;
cout << "The moment of Inertia for the I-Beam is: " << Ibeam << "in^4";
}
else if (beamType == 'R')
{
//prompt for necessary data
cout << "Please enter minor base value: ";
cin >> minBase;
cout << "Enter minor height value: ";
cin >> minHeight;
//calcualte for inertia
RectBeam = minBase*(minHeight ^ 3) / 12;
cout << "The moment of inertia for the Rectangular Beam is: " << RectBeam << "in^4";
}
else return(beamType == 'C');
{
//prompt for necessary data
cout << "Please enter radius value: ";
cin >> radius;
//calcualte for inertia
CylBeam = pi*(radius ^ 4) / 4;
cout << "The moment of inertia for the Cylindrical Beam is: " << CylBeam << "in^4";
//goto to go back to prompt asking what beam
//use goto to end program
}