diff options
Diffstat (limited to '1544/CH1/EX1.14/Ch01Ex14.sce')
-rwxr-xr-x | 1544/CH1/EX1.14/Ch01Ex14.sce | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/1544/CH1/EX1.14/Ch01Ex14.sce b/1544/CH1/EX1.14/Ch01Ex14.sce new file mode 100755 index 000000000..19b5fa174 --- /dev/null +++ b/1544/CH1/EX1.14/Ch01Ex14.sce @@ -0,0 +1,11 @@ +// Scilab code Ex1.14: Pg 20 (2008)
+clc; clear;
+P = 12.5; // Power of the machine, kW
+t = 8.5; // Time for which the machine is operated, h
+W = P*t; // Electric energy, kWh
+// Cost per unit = 7.902 p, therefore calulating the cost of 106.25 units
+cost = ( W*7.902 ); // Cost for operating machine, p
+printf("\nThe cost of operating the machine = %4.2f pounds", cost*1e-02)
+
+// Result
+// The cost of operating the machine = 8.40 pounds
|