Advertisement
Omar_Natour

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

Sep 15th, 2015
106
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.  * ojnatour0001@studnet.stcc.edu
  7.  */
  8.  
  9. public class projection
  10. {
  11.     public static void main(String[] args)
  12.     {
  13.         int pop = 312032486;
  14.         double yr  = (1/7.0)*60*60*24*365 - (1/13.0)*60*60*24*365 + (1/45.0)*60*60*24*365;
  15.  
  16.         System.out.println("The current population of the United States is " + pop + ".");
  17.         System.out.println("In one year the populatoin will increase to " + (yr + pop) + ".");
  18.         System.out.println("In two years the populatoin will increase to " + (yr*2 + pop) + ".");
  19.         System.out.println("In three years the populatoin will increase to " + (yr*3 + pop) + ".");
  20.         System.out.println("In four years the populatoin will increase to " + (yr*4 + pop) + ".");
  21.         System.out.println("In five years the populatoin will increase to " + (yr*5 + pop) + ".");
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement