summaryrefslogtreecommitdiff
path: root/620/CH5/EX5.2/example5_2.sce
blob: ea71faf21b93449cece400f7f3fa7910fe4f67ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
disp("Part a");
r1=3.3;
r2=1;
r3=4.7;
r=r1+r2+r3;
v=18;
i=v/r;
v1=i*r1;
v2=i*r2;
v3=i*r3;
p1=v1*i;
disp("power delivered (in mW) in the 3.3 kΩ resistor is"); disp(p1);
p2=v2*i;
disp("power delivered (in mW) in the 1 kΩ resistor is "); disp(p2);
p3=v3*i;
disp("power delivered (in mW) in the 4.7 kΩ resistor is"); disp(p3);
disp("Part b");
p=p1+p2+p3;
disp("the total power delivered (in mW) is"); disp(p);