Compute The Diameters of Rod in C Language
Not what you're looking for?
A program to compute the diameter in centimeters of steel rod, and aluminum rod, and a copper rod, which can withstand a particular compression load. The allowable compression stress of steel, aluminum, and copper is 25,000 lbs/m², 15,000 lbs/m², and 20,000 lbs/m², respectively.
Area of rod = compression load
________________________
Allowable compression stress
Area = π r^2 where diameter d= 2r
Input the compression load. Print the type of material, load, allowable stress, and diameter. Used formatted output with field with specifications that align output.
Purchase this Solution
Solution Summary
The solution gives a complete C program on computing the diameters of steel rod, aluminum rod, and copper rod using the given formula. The output of the program is also provided for reference.
Solution Preview
Hi, this is my c program. I run the code in turbo c++. Attached is my output. Hope it helps.
#include <stdio.h>
#include <math.h>
void main()
{
double comprLoad,comprStress; /*to store load,stress of rod */
double d,area; /* for diameter and area of the rod */
char type[20]; /* rod type */
/* ...
Purchase this Solution
Free BrainMass Quizzes
C# variables and classes
This quiz contains questions about C# classes and variables.
Javscript Basics
Quiz on basics of javascript programming language.
Inserting and deleting in a linked list
This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.
Word 2010: Tables
Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.