about | help | code help+videos | done | prefs |
Write a function growth3(totalDays) that simulates a population that grows by 110% every day. Assume that the initial population size is 10. Return the total population size on the last day (it should be an integer). You must use a for loop to complete this computation. Don't just plug the input into a mathematical formula. growth3(10) → 25 growth3(1) → 11 growth3(2) → 12 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy