Question: Write a C + + program that will predict the size of a population of lovebugs for a certain number of days. The user will

Write a C++ program that will predict the size of a population of lovebugs for a certain number of days. The user will enter the starting number of lovebugs, the average daily percent increase (in its percentage form, say 30%), and the number of days the lovebugs will mulitply. In order for the population to increase, there must be a minimum of two lovebugs. Be sure to validate all input values. Use a C++ loop (while loop, do/while loop, or for loop) to calculate the population values to to print to the screen. Round all population values to 3 decimal places. Be sure the program calculates and displays a table of data showing the correct calculated increase in population for the number of days requested. Also be sure the program does not allow invalid input to be entered, for instance if a negative percentage were entered a number less than zero were entered, an error message would pop up. Also include an algorithm for the program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!