summaryrefslogtreecommitdiff
path: root/995/CH5/EX5.2/Ex5_2.sce
blob: af4b968f45fb3498c1d177d1347d74655b21dc38 (plain)
1
2
3
4
5
6
7
8
9
//Ex:5.2
clc;
clear;
close;
i=15*10^-3;
R=(21-2.2)/i;
v=18.8;//in volts
P=i*v*1000;
printf("Resistor %d ohms of %d mW",R,P);