blob: b18b83f7ce721b3f81f89438a52e9268acdf03a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//Example 17_9
clc();
clear;
//To find the current I in the battery
r1=3 //Units in Ohms
r2=6 //Units in Ohms
rbc=(r1*r2)/(r1+r2) //Units in Ohms
r3=4 //Units in Ohms
rac=r3+rbc //Units in Ohms
v=12 //Units in V
i=v/rac //Units in A
printf("The current I=%d A",i)
|