write C++ program that predict the population size of organisms.must ask user to enter daily avarege increase in %, number they will multiply.results must be displayed in a table form.
#include <iostream>
using namespace std;
int main(){
int days;
double size, inc;
cout<<"Inputinitial population size: ";
cin>>size;
cout<<"Days: ";
cin>>days;
cout<<"Daily avarege increase, %: ";
cin>>inc;
cout<<" Day | Size
";
cout<<"________________|________________
";
inc /= 100;
for(int d = 1; d < days; d++){
size += size*inc;
cout<<" "<<d<<" | "<<(int)size<<"
";
}
system("pause");
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++