Answer to Question #9709 in C++ for jacob
2012-05-17T09:14:20-04:00
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.
1
2012-05-18T07:17:58-0400
#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++
Comments
Leave a comment