summaryrefslogtreecommitdiff
path: root/620/CH7/EX7.7/example7_7.sce
blob: dc47f1cc2cd9d988763a9c3c656a3e7b3be8f875 (plain)
1
2
3
4
5
6
7
8
v1=9;
v2=12;
i=100*10^(-3);
v=v2-v1;
r=v/i;
disp("the value of the resistor (in Ω) is"); disp(r);
p=v*i;
disp("power rating (in W) of the required resistor is"); disp(p);