blob: 9c29e6bf5de8af3e9711eec7909479d9ddf63d1a (
plain)
1
2
3
4
5
6
7
8
9
|
//chapter 4 Ex 23
clc;
clear;
close;
b_taken=6; b_poured=4; //number of bottles taken and poured respectively
oil_filled=4/5; oilfill_poured=3/4;
numBottles=(b_taken-b_poured)/(oil_filled-oilfill_poured);
mprintf("The required number of bottles are %0.0f",numBottles);
|