Write a program that will predict the size of a population of red ants. The
program should ask the user for the starting number of red ants e.g. 2,000,000,
their average daily population increase as a percentage of current population
e.g., 5%, and the number of days they will multiply e.g. 10 days. Use a do while
to display the size of the population for each day.
Draw a flow chart and write down a pseudo code before attempting this
number.
Input Validation:
Do not accept a number less than two for the starting size of the population.
Do not accept a negative number for average daily population increase.
Do not accept a number less than one for the number of days they will
multiply.
Comments
Leave a comment