Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Omar Natour
- * 9/15/2015
- * CSC-111-D01
- * Problem 1-11
- * Create a program that calculates and outputs future populations
- * ojnatour0001@studnet.stcc.edu
- */
- public class projection
- {
- public static void main(String[] args)
- {
- int pop = 312032486;
- double yr = (1/7.0)*60*60*24*365 - (1/13.0)*60*60*24*365 + (1/45.0)*60*60*24*365;
- System.out.println("The current population of the United States is " + pop + ".");
- System.out.println("In one year the populatoin will increase to " + (yr + pop) + ".");
- System.out.println("In two years the populatoin will increase to " + (yr*2 + pop) + ".");
- System.out.println("In three years the populatoin will increase to " + (yr*3 + pop) + ".");
- System.out.println("In four years the populatoin will increase to " + (yr*4 + pop) + ".");
- System.out.println("In five years the populatoin will increase to " + (yr*5 + pop) + ".");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement