assignment2 - p scanf"%f"&total s double...

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("%f",&total); s // double total2=total*PERCENTAGE; // double total3=total2+total ; // printf("Annual population %.2f\n",total3); p // double count_years=total+total3; // printf("Total count years %f\n",count_years); p } } return 0; }...
View Full Document

This note was uploaded on 10/03/2010 for the course CS 117 taught by Professor Devi during the Spring '07 term at Long Island U..

Ask a homework question - tutors are online