summaryrefslogtreecommitdiff
path: root/620/CH20/EX20.7/example20_7.sce
diff options
context:
space:
mode:
Diffstat (limited to '620/CH20/EX20.7/example20_7.sce')
-rw-r--r--620/CH20/EX20.7/example20_7.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/620/CH20/EX20.7/example20_7.sce b/620/CH20/EX20.7/example20_7.sce
new file mode 100644
index 000000000..a68acd8c4
--- /dev/null
+++ b/620/CH20/EX20.7/example20_7.sce
@@ -0,0 +1,17 @@
+p1=60;
+t=8;
+p2=9;
+amt=20;
+cost=0.08;
+disp("Part a");
+total=365*t*p1*cost/1000;
+disp("Cost (in $) to operate the incandescent lamp for a year is"); disp(total);
+disp("Part b");
+total2=365*t*p2*cost/1000;
+disp("Cost (in $ )to operate the fluorescent lamp for a year is"); disp(total2);
+disp("Part c");
+sav=total-total2;
+mon=amt*12/sav;
+t1=10000;
+t2=t1-365*t*mon/12;
+disp("the time (in hours) necessary for the energy savings is");disp(t2); \ No newline at end of file