blob: 9958b1f777f080a926d15e2406648e972d87201c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
clear//
//Variables
R1 = 4 //Resistance (in kilo-ohm)
R2 = 6 //Resistance (in kilo-ohm)
R3 = 2 //Resistance (in kilo-ohm)
//Calculation
R = R1 + R2 + R3 //Equivalent Resistance(in kilo-ohm)
//Result
printf("\n Equivalent Resistance is %0.3f kilo-ohm." ,R)
|