blob: d2f27f5d08e2ac78feab834dba4c401bced754c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
clear//
//Variables
p = 2.8 * 10**-8 //Resistivity (in ohm-meter)
d = 0.15 * 10**-2 //Diameter of wire (in meter)
R = 10 //Resistance (in ohm)
//Calculation
A = %pi *d*d/4 //Area of cross section (in metersquare)
l = R*A/p //Length of wire (in meter)
//Result
printf("\n Length of the wire is %0.0f meter.",l)
|