summaryrefslogtreecommitdiff
path: root/1529/CH2/EX2.19/2_19.sce
diff options
context:
space:
mode:
Diffstat (limited to '1529/CH2/EX2.19/2_19.sce')
-rwxr-xr-x1529/CH2/EX2.19/2_19.sce18
1 files changed, 18 insertions, 0 deletions
diff --git a/1529/CH2/EX2.19/2_19.sce b/1529/CH2/EX2.19/2_19.sce
new file mode 100755
index 000000000..50c5bbb85
--- /dev/null
+++ b/1529/CH2/EX2.19/2_19.sce
@@ -0,0 +1,18 @@
+//Chapter 2, Problem 19
+clc;
+P1=3000; //power in watts
+P2=150; //power in watts
+t1=20; //time in hours
+t2=30; //time in hours
+n1=2; //no of fires
+n2=6; //no of light
+m=14; //cost per unit
+E1=P1*t1;
+w1=n1*E1;
+E2=P2*t2;
+w2=n2*E2;
+T=w1+w2;
+c=m*(T/1000);
+printf("\nIf the cost of electricity is 14 p per unit\n")
+printf("\n the weekly cost of electricity to the business = %f p",c);
+printf("\n\t\t\t\t\t\t= %.2f euro",c/100);