Skip to content

Instantly share code, notes, and snippets.

@bytecodeman
Created September 12, 2018 21:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bytecodeman/1f155ff4071b3c4d6b8077190de482d0 to your computer and use it in GitHub Desktop.
Save bytecodeman/1f155ff4071b3c4d6b8077190de482d0 to your computer and use it in GitHub Desktop.
CSC-111 HW1 Population Project
// Tony Silvestri
// 9/14/17
// silvestri@stcc.edu
// Population Projection Problem
// CSCI-111-D01
// HW 2: Problem 1-11
public class Population {
public static void main(String[] args) {
System.out.println("Population in Year 0: " +
312032486);
System.out.println("Population in Year 1: " +
(312032486 + 365*24*60*60/7 - 365*24*60*60/13 + 365*24*60*60/45));
System.out.println("Population in Year 2: " +
(312032486 + 2*(365*24*60*60/7 - 365*24*60*60/13 + 365*24*60*60/45)));
System.out.println("Population in Year 3: " +
(312032486 + 3*(365*24*60*60/7 - 365*24*60*60/13 + 365*24*60*60/45)));
System.out.println("Population in Year 4: " +
(312032486 + 4*(365*24*60*60/7 - 365*24*60*60/13 + 365*24*60*60/45)));
System.out.println("Population in Year 5: " +
(312032486 + 5*(365*24*60*60/7 - 365*24*60*60/13 + 365*24*60*60/45)));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment