Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

7. Discuss the implications of a skill-based pay plan for training.

Answered: 1 week ago

Question

4. Make recommendations on steps to take to melt the glass ceiling.

Answered: 1 week ago