kokonut island puzle

General FreeBASIC programming questions.
Post Reply
bluatigro
Posts: 660
Joined: Apr 25, 2012 10:35
Location: netherlands

kokonut island puzle

Post by bluatigro »

i fount this puzle in a book :
there are 5 person's + 1 monkey
they shipwrek on a Island
the fisrst day they colect kokonut's
in the night happens this :
eats person goes to the pile
divides it in 5 hides 1/5
and gives 1 to the monkey
the 2e day
thay divide the remaining pile in 5
and give 1 to the monkey
now calc the size of every pile

if you got that :
how about a random number of person's and monkey's ?
Post Reply