+ 1

Coding Challenge Semi-Intermediate

The Greenfly Problem - They reproduce asexually. After a week of life a female can produce eight offspring a day. Starting at day 1 with a single mature female, how many greenfly could be there at the end of day 28? It may be assumed that : There are no deaths and all offspring are females. At the end of day 1 there will be 9 greenfly(original+8 offspring). At the end of day 7 - 57 greenfly (original +8*7). At the end of day 8- 129(Original + 8*8offspring+ 64offsprings) from daughters​ produced on day 1.

8th Oct 2017, 3:00 PM
Aayush Kucheria
Aayush Kucheria - avatar
1 Answer
8th Oct 2017, 5:12 PM
Amr Ibrahim Khudair
Amr Ibrahim Khudair - avatar