summaryrefslogtreecommitdiff
path: root/3769/CH6/EX6.1/Ex6_1.sce
blob: 13e0498b25308721d6ab22902722c21723634f27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
clear
//Given
a=4
b=2.0
c=8
d=5
e=3.0

//Calculation
I1=((a*c)+(b*e))/((b*c)+(d*e))
I2=(a-(2*I1))/e
V=(I1-I2)*5

//Result
printf("\n (i) Current through each battery is %0.2f A and %0.2f A",I1,I2)
printf("\n (ii) Terminal voltage is %0.2f  V",V)