summaryrefslogtreecommitdiff
path: root/1445/CH1/EX1.46/ch1_ex_46.sce
diff options
context:
space:
mode:
Diffstat (limited to '1445/CH1/EX1.46/ch1_ex_46.sce')
-rw-r--r--1445/CH1/EX1.46/ch1_ex_46.sce26
1 files changed, 26 insertions, 0 deletions
diff --git a/1445/CH1/EX1.46/ch1_ex_46.sce b/1445/CH1/EX1.46/ch1_ex_46.sce
new file mode 100644
index 000000000..4623527b7
--- /dev/null
+++ b/1445/CH1/EX1.46/ch1_ex_46.sce
@@ -0,0 +1,26 @@
+//CHAPTER 1- D.C. CIRCUIT ANALYSIS AND NETWORK THEOREMS
+//Example 46
+
+disp("CHAPTER 1");
+disp("EXAMPLE 46");
+
+//VARIABLE INITIALIZATION
+v=240; //in Volts
+
+//SOLUTION
+//case1: p=60W
+p1=60; //in Watts
+r1=(v^2)/p1;
+disp(sprintf("Resistance of the metal filament lamp is %d Ω",r1));
+
+//case2: p=100W
+p2=100; //in Watts
+r2=(v^2)/p2;
+
+if(r1>r2) then
+disp(sprintf("Resistance of %d W lamp will be greater",p1));
+else
+disp(sprintf("Resistance of %d W lamp will be greater",p2));
+end;
+
+//END