60 463
Assignments Done
98,1%
Successfully Done
In April 2018

Answer to Question #9709 in C++ for jacob

Question #9709
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.
Expert's answer
#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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions