# C++ Program: Output Stress and Strain at Given Loads

Not what you're looking for?

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 pounds in increments of 100,000 pounds. The modulus of elasticity E for steel is 30 x 10 with an exponent of 6.

A function to compute the stress from the formulas

Stress f = P/A (p divided by a)

Where A = πD^2 /4.0

A function to compute the strain from the formulas

Elongated pr shortened length L= FL/E

Strain e= L/L = f/E

A function to output the stress and strain at different loads of P.

##### Purchase this Solution

##### Solution Summary

The solution gives a complete c++ program on calculating the stress and strain in a steel rod of diameter D (inches) and length L (inches) subject to the compression loads. Explainations are added after some important codes. A screenshot of output is also given.

##### Purchase this Solution

##### Free BrainMass Quizzes

##### C# variables and classes

This quiz contains questions about C# classes and variables.

##### C++ Operators

This quiz tests a student's knowledge about C++ operators.

##### Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

##### Javscript Basics

Quiz on basics of javascript programming language.

##### Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.