Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Trey Darling
- * 9/9/2019
- * Intro to Java CSC-111
- * CSC-111 Homework 1
- * Write a program to display how the Population changes yearly without using Variables or Loops
- * tjdarling0001@student.stcc.edu
- */
- public class Population {
- public static void main(String[] args) {
- System.out.println("Initial Population: " + 312032486);
- System.out.print("Population After One Year: ");
- System.out.println(
- 312032486 + ((365 * 24 * 60 * 60) / 7) - ((365 * 24 * 60 * 60) / 13) + ((365 * 24 * 60 * 60) / 45));
- System.out.print("Population After Two Years: ");
- System.out.println(
- 314812582 + ((365 * 24 * 60 * 60) / 7) - ((365 * 24 * 60 * 60) / 13) + ((365 * 24 * 60 * 60) / 45));
- System.out.print("Population After Three Years: ");
- System.out.println(
- 317592678 + ((365 * 24 * 60 * 60) / 7) - ((365 * 24 * 60 * 60) / 13) + ((365 * 24 * 60 * 60) / 45));
- System.out.print("Population After Four Years: ");
- System.out.println(
- 320372774 + ((365 * 24 * 60 * 60) / 7) - ((365 * 24 * 60 * 60) / 13) + ((365 * 24 * 60 * 60) / 45));
- System.out.print("Population After Five Years: ");
- System.out.println(
- 323152870 + ((365 * 24 * 60 * 60) / 7) - ((365 * 24 * 60 * 60) / 13) + ((365 * 24 * 60 * 60) / 45));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement