blob: e5180779b42286e753721136bd36d97007246123 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
clear//
//Variables
R1 = 220 //Resistance (in ohm)
R2 = 470 //Resistance (in ohm)
R3 = 560 //Resistance (in ohm)
R4 = 910 //Resistance (in ohm)
//Calculation
R = R1 + R2 + R3 + R4 //Net Resistance (in ohm)
//Result
printf("\n Total resistance of circuit is %0.3f ohm.",R)
|