Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Electric wire, like that in the photo, is a cylindrical conductor covered by an

ID: 3661797 • Letter: E

Question

Electric wire, like that in the photo, is a cylindrical conductor covered by an insulating material. The resistance of a piece of wire is given by the formula R = rho L/A = 4 rho L/pi d ^2 where rho is the resistivity of the conductor, and L, A, and d are the length, cross-sectional area, and diameter of the wire. The resistivity of copper is 1.678 Times 10^-8 Ohm m. The wire diameter, d, is commonly specified by the American wire gauge (AWG), which is an integer, n. The diameter of an AWG n wire is given by the formula d = 0.127 Times 92^36 - n/39 mm Write a C++ function

Explanation / Answer

#include<iostream.h>

#include<conio.h>

#include<math.h>

double diameter(int wire_gauge);

double copper_wire_resistance(double length, int wire_gauge);

double alluminium_wire_resistance(double length, int wire_gauge);

int main()

{

int l,w;

cout<<"please enter the length and wire_gauge respectively";

cin>>l;

cin>>w;

cout<<"the diameter of wire is:"<<diameter(w);

cout<<"the resistance of copper_wire is:"<<copper_wire_resistance(l,w);

cout<<"the resistance of alluminium_wire is:"<<alluminium_wire_resistance(l,w);

}

double diameter(int wire_gauge)

{

double result;

double diam;

result=(36-wire_gauge)/39;

result= pow(92,result);

result= 0.127*result;

diam=result;

return diam;

}

double copper_wire_resistance(double length, int wire_gauge)

{

double resistivity;

double result2;

resistivity= pow(10,-8);

resistivity= 1.678*resistivity;

result2=3.14*diameter(wire_gauge)*diameter(wire_gauge);

result2=(4*resistivity*length)/result2;

return result2;

}

double alluminium_wire_resistance(double length, int wire_gauge)

{

double resistivity;

double result2;

resistivity= pow(10,-8);

resistivity= 2.82*resistivity;

result2=3.14*diameter(wire_gauge)*diameter(wire_gauge);

result2=(4*resistivity*length)/result2;

return result2;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote