summaryrefslogtreecommitdiff
path: root/2459/CH13/EX13.10/Ex13_10.sce
blob: de91a22a8c0056b5050f2b76c80956066e85f881 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//chapter13
//example13.10
//page283

R1=1 // kilo ohm
R2=2 // kilo ohm
Vt=6 // V

Vb=Vt*R1/(R1+R2)

if Vb==4
    printf("circuit is operating properly \n")
else 
    printf("circuit is not operating properly because voltage at B should be %.1f V instead of 4 V \n",Vb)
end