Write a main function and the following functions to compute the stress and stra
ID: 3636297 • Letter: W
Question
Write a main function and the following functions to compute the stress and strain in a steel rod of diameter D (inches) and length L (inches) subject to the compression loads P of 10,000 to 1,000,000 lbs. in increments of 100,000 pounds. The modulus of elasticity E for steel is 30 x 10^6
Function to compute stress from the formulas
Stress f = P/A where A = D^2/4.0
Function to compute strain from the formulas
Elongated of shortened length L = fL/E strain e = L/L = f/E
Functioin to output the stress and strain at different loads of P
Main
Calculate stress calculate strain output
Explanation / Answer
Dear,
Here is the code
#include
double GetStress(int p,double d)
{
double A=(3.14*diameter*diameter)/4;
double s;
s=p/A;
return s;
}
double GetStrain(double str)
{
double sta;
sta=str/(30*math.pow(10,6));
}
void main()
{
double diameter,stress,A;
printf("Enter Diameter:");
scanf("%d",&diameter);
for(...
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.