Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

The answer to this question should provide: 1) The source code to your program (also insert the source code into the assignment file). 2) The

The answer to this question should provide: 1) The source code to your program (also insert the source code into the assignment file). 2) The output showing the results of all the test cases; insert the output into the assignment file. This needs to be in basic c programming format. image text in transcribed

You must develop a program that calculates the weight of a number of flat washers with the following d: The given dimension of the washer is given by its thickness (x), the external diameter (d:) and the hole diameter (d). Thus the area of the washer is given by a (d, /2) -d2) The volume, v, of the washer is given by v-xa The weight, w, of the washer is given by wd where d is the density of washer's material. From these equations, the weight w. of n washers is given by Develop a program that requests from the user the following data The number n of washers, The density of the washer's material, in kg/cm * The thickness x of the washer, in centimeters (cm) The extermal diameter, d, of the washer in em, The diameter of the hole, di, of the washer in em . For the main function sav Calls the function totalweight to compute weight of the n flat washers. Display results to the user in a message (see the following example) that includes data input by the user and the weight of the washers. Format the output values to display at most the number of digits in the fractional part of the real values shown the message example. The washer characteristics are o o Density: 0.00260 kg/cm 3 Thickness: 0.030 cm External diameter: 0.500 cm Diameter of the hole: 0.230 cm The weight of 1 washers is 1.21e-005 kg For the function totalneight o Define parameters to receive the data input by the user o Define local variable for storing the total weight, w o Note that the math header file, math.h, provides the symbolic constant M PI for the value of . o Instead of using a single instruction to compute the force value, use a number of instructions to "accumulate" values into the variable wu as follows. Note that these are not true mathematical equations but show how w as a compu intermediate values during the computation. uter variable can accumulate Assigns to w, the value of Assigns to w, the value of nd -dj) nxd di-di w,4 Assigns to w, the value of

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students explore these related Databases questions

Question

What do Dimensions represent in OLAP Cubes?

Answered: 3 weeks ago