summaryrefslogtreecommitdiff
path: root/1553/CH11/EX11.10/11Ex10.sce
diff options
context:
space:
mode:
Diffstat (limited to '1553/CH11/EX11.10/11Ex10.sce')
-rw-r--r--1553/CH11/EX11.10/11Ex10.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/1553/CH11/EX11.10/11Ex10.sce b/1553/CH11/EX11.10/11Ex10.sce
new file mode 100644
index 000000000..29047e6d9
--- /dev/null
+++ b/1553/CH11/EX11.10/11Ex10.sce
@@ -0,0 +1,12 @@
+//Ex 10
+
+clc;
+clear;
+close;
+n1=6;c=10;
+n2=4;s=6;
+n=double(lcm(int32([4,6]))); //Number of bananas
+cp=(c/n1)*n;
+sp=(s/n2)*n;
+lossPercent=(cp-sp)/cp*100;
+printf("The loss is %d percent",lossPercent);