blob: 6a88d3e008e3b67b62984ec37495be1173a1a5da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
//Chapter 1, Example 1.6
clc
//Initialisation
r1=10 //resistance in ohm
r2=20 //resistance in ohm
//Calculation
r=(r1*r2)/(r1+r2) //resistance in ohm
//Results
printf("Equivalent Resistance, R = %.2f Ohm",r)
|