Omar_Natour

Natour, O. 9/16/15 Problem 1-11 Csc111-D05

Sep 15th, 2015
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.89 KB | None | 0 0
  1. /* Omar Natour
  2.  * 9/15/2015
  3.  * CSC-111-D01
  4.  * Problem 1-11
  5.  * Create a program that calculates and outputs future populations
  6.  */
  7.  
  8. public class projection
  9. {
  10.     public static void main(String[] args)
  11.     {
  12.         int pop = 312032486;
  13.         double yr  = (1/7.0)*60*60*24*365 - (1/13.0)*60*60*24*365 + (1/45.0)*60*60*24*365;
  14.  
  15.         System.out.println("The current population of the United States is " + pop + ".");
  16.         System.out.println("In one year the populatoin will increase to " + (yr + pop) + ".");
  17.         System.out.println("In two years the populatoin will increase to " + (yr*2 + pop) + ".");
  18.         System.out.println("In three years the populatoin will increase to " + (yr*3 + pop) + ".");
  19.         System.out.println("In four years the populatoin will increase to " + (yr*4 + pop) + ".");
  20.         System.out.println("In five years the populatoin will increase to " + (yr*5 + pop) + ".");
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment