blob: 1a0c0402360e052c8b2ca9206d2cc69ec29e75be (
plain)
1
2
3
4
5
6
7
8
9
10
|
//chapter 4 Ex 32
clc;
clear;
close;
girlsLeave=15; boysEachgirl=2; boysLeave=45; girlsEachboy=5;
//let x boys are there at present; thus totalboys=x+45; girls=5*x
boysPresent=boysLeave/(girlsEachboy*boysEachgirl-1);
girlsBeginning=girlsEachboy*boysPresent+girlsLeave;
mprintf("The number of girls in the beginning were %d",girlsBeginning);
|