Question: C language question Consider the following data regarding the resistance of various metals: Resistance of a metal- resistivity *length of wire I area of wire

C language questionC language question Consider the following data regarding the resistance of various

Consider the following data regarding the resistance of various metals: Resistance of a metal- resistivity *length of wire I area of wire Resistivity of silicon = 2.3 * 10^-3 Resistivity of copper = 1.7 * 10-8 Length 1, 85 Diameter (in mm) = 5, 2 Instructions Write a function (not main) that can accept as input parameters a string representing a metal name, the resistivity of the metal, the length of a wire, and the diameter of a wire. The function should calculate the resistance of a metal, given the formula above, and should print the result to the console. You should output all of the items you used to calculate the resistivity, and what the result was. For example, you might print the following statement: Resistance of Copper wire with resistivity of .0023 and length of 1 meter and diameter of 2 mm is: .37456 Inside your main function, call the function you made at least two times passing it different values. NOTE: To accept a string as a parameter to a function, you would specify the char [1, as follows: ....madeup_function (char some_string_parameter[,... another parameter...etc. Think about the types of numbers you should accept. Will they be whole numbers, or floating point numbers? How large might they be? What data type should you use for input and output? Hints: The math library includes constants (variables whose values cannot be modified) and functions useful for math. If you include the library, you can use them as-if you had created them in your file. Here are a few that might be helpful: M-PI-value of 11 MPI-4-value of /4 result pow(number, power you want to raise it to)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!