blob: 2ba00a6891cac80786323e2e27ddadaf87a7befe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//Chapter 1, Example 1.5
clc
//Initialisation
r1=10 //resistance in ohm
r2=20 //resistance in ohm
r3=15 //resistance in ohm
r4=25 //resistance in ohm
//Calculation
r=r1+r2+r3+r4 //resistance in ohm
//Results
printf("Equivalent Resistance, R = %d Ohm",r)
|