assignment2 - p...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <stdio.h> #define PERCENTAGE 0.10 #define MARK 30000 int main (void) { double CAPACITY=9870; double i; for (i=CAPACITY;CAPACITY<=MARK;++i) { while(i>0) { double current=CAPACITY*PERCENTAGE;///continue calculating until reach 30,000 double total=CAPACITY + current; printf("Annual population %.2f\n",total);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: p scanf(&quot;%f&quot;,&amp;total); s // double total2=total*PERCENTAGE; // double total3=total2+total ; // printf(&quot;Annual population %.2f\n&quot;,total3); p // double count_years=total+total3; // printf(&quot;Total count years %f\n&quot;,count_years); p } } return 0; }...
View Full Document

Ask a homework question - tutors are online