// A chicken farmer is expanding his coops. Each year, each chicken // produces 10 chicks. He keeps half of all the chicks born that year // to increase the number of chickens he has. Furthermore, suppose // that approximately 1/4 of the chickens die every year (rounded down // — e. g. if there are 6 chickens, 1 chicken dies). Write a function // that takes the starting number of chickens, a number of years and // returns how many chickens the farmer has at the end of that year. // // You may use loops or recursion. int numChickens(int startChickens, int num Years);
The correct answer has not yet been found for the question. Our moderators are looking for the most suitable solutions for you. Could you share your comments with us for the answer to this question?