1 2 3 4 5 6 7 8 9 10 11 12 13 14
clear //Given R1=4.5 A1=1 A2=2.0 l2=3 l1=1.0 //Calculation R=(l2/l1)*(A1/A2) R2=R*R1 //Result printf("\n The resistance of another wire is %0.3f ohm", R2)