ASDV-Java/Lab3CalebFontenot/src/main/java/Exercise01_11.java
2022-08-25 16:05:45 -05:00

26 lines
750 B
Java

/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
/**
*
* @author caleb
*/
public class Exercise01_11 {
public static void main(String[] args)
{
double Population = 312032486.0;
for (int i = 1; i <= 5; i++) {
//One birth every 7 seconds
Population += ((60 * 60 * 24 * 365) / 7.0);
//One death every 13 seconds
Population -= ((60 * 60 * 24 * 365) / 13.0);
//One new immigrant every 45 seconds
Population += ((60 * 60 * 24 * 365) / 45.0);
System.out.println(Population);
}
}
}