Functions to compute stress and strain in steel rod

Assignment Help C/C++ Programming
Reference no: EM1354776

Write a main function and the following functions to compute the stress and strain in a steel rod of diameter D (inches) and the 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 106. A function to compute the stress from the formulas Stress f =P/A Where A=prD^2 / 4.0 A function to compute the strain from the formulas Elongated or shortened length ?L=fL/E Strain e=?L/L=f/E A function to output the stress and strain at different loads of P. 


Formatting instructions:required to write three functions: stress, strain, and output. 
The stress function takes two parameters ( load & diameter ) and uses these values to compute and return a single value representing the amount of stress. 

The strain function takes only a single parameter ( which is the stress value computed by the stress function ) and computes and returns the correct strain value. 

The output function takes three parameters (the load, stress, and strain ) and simply outputs each of these to the screen in a presentable format. 

The main program is what "calls" each of the functions.You are required to present what the stress and strain values would be for multiple samples of loads. Thus, your main program should loop through each required load value. Each loop iteration should call each of the three functions above. (Note: the length value is not required to calculate the result ) 

Output should look as follows: 
Enter diameter and length of rod: 10 10 

Load Stress Strain 
10000 127.323936 0.000004 
110000 1400.563354 0.000047 
210000 2673.802734 0.000089 
310000 3947.042236 0.000132 
410000 5220.281738 0.000174 
510000 6493.520996 0.000216 
610000 7766.760254 0.000259 
710000 9040.000000 0.000301 
810000 10313.239258 0.000344 
910000 11586.478516 0.000386 

Reference no: EM1354776

Questions Cloud

Explain find a business article about the importance : Explain find a business article about the importance of Integrity in business OR an example of integrity gone sour
Purposes of analysis : Eastern Telecom is planning to decide whether to increase its cash dividend immediately or use funds to rise its future growth rate. It will use the dividend valuation model originally presented in purposes of analysis.
Explain this week we continue the reports : Explain This week we continue the reports on the different countries and The second report is on the culture of each chosen country.
Problem regarding test anxiety : What are some examples of items you would include in an assessment of an individual's level of test anxiety? How would you evaluate the appropriateness of your items and each item's performance in the assessment?
Functions to compute stress and strain in steel rod : 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.
Occupational-academic and counseling : Explain who is qualified to administer and interpret the measure and the settings such as occupational, academic, or counseling in which it would be appropriate to use the measure.
Explain what are some ways a new supervisor : Explain What are some ways a new supervisor can use power and authority effectively
Function to count number of times the given number occured : Write a main function to input 20 integers in the range of 1 to 6. Write a function to count the number of times the numbers 2 and 5 occur. The function should declare static variables count2 and count5.
Explain ways to collect the relevant data for evaluating : Explain Ways to collect the relevant data for evaluating the current situation and How should the raw data be selected for evaluating the project?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd