summaryrefslogtreecommitdiff
path: root/1553/CH11/EX11.10/11Ex10.sce
blob: 29047e6d9dce5c66efb0acbbdd43e6034627fcad (plain)
1
2
3
4
5
6
7
8
9
10
11
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);