summaryrefslogtreecommitdiff
path: root/3648/CH17/EX17.15/Ex17_15.sce
blob: 78a08536bd6a293d2cc1d28987dfc867cb2e66ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//Example 17_15
clc();
clear;
//To find the terminal potential of each battery
v=18         //Units in V
r=9           //Units in Ohms
i=v/r       //Units in A
r1=0.1     //Units in Ohms
v1=-i*r1      //Units in V
v2=24       //Units in V
v11=v1+v2        //Units in V
r2=0.9       //Units in Ohms
v3=i*r2     //Units in V
v4=6         //Units in V
v22=v3+v4      //Units in V   
printf("The Potential difference between d to c is=%.1f V",v11)
printf("\nThe potential difference between b to a is=%.1f V",v22)