summaryrefslogtreecommitdiff
path: root/3835/CH2/EX2.4/Ex2_4.sce
blob: 90aa8ed6cc1894b5d829f9c3f1c027c89c4a0421 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
clear
//
vs=12
rs=0.3
il=10
//case a
p=vs*il
printf("\n power= %0.1f  W",p)
//case b
power=il**2*rs
printf("\n power dissipated= %0.1f  W",power)
//case c
totpow=(vs-il*rs)*il
printf("\n total power supplied by practical source is= %0.1f  W",totpow)
i=vs/rs
printf("\n current source= %0.1f  A",i)