/* title: WorldPopulationGrowthCalculator author: aeriqusyairi date: dec30 2011 */ #include<stdio.h> #include<stdlib.h> int main(){ int i=1; double a=0,b=0; printf("Input the current world population: "); scanf("%lf", &a); printf("Input the annual world population growth rate: "); scanf("%lf", &b); while(i <= 3){ a *= b; printf("The estimate world population after %d year is %lf.\n",i,a); i++; } system("pause"); return 0; }
My C Repository
C How to Program
Sweet thanks to my broski Yusuke Fiz for this Deitel book.
You light up my life dude.
Just another personal public repository.
Wednesday, March 14, 2012
World Population Growth Calculator
Reads current world population and the annual world population growth rate and computes the estimated world population after one, two,and three years.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment