Init
This commit is contained in:
20
Lab3CalebFontenot/src/main/java/Exercise01_04.java
Normal file
20
Lab3CalebFontenot/src/main/java/Exercise01_04.java
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* 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_04 {
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println("a a^2 a^3");
|
||||
System.out.println("1 1 1");
|
||||
System.out.println("2 4 8");
|
||||
System.out.println("3 9 27");
|
||||
System.out.println("4 16 64");
|
||||
}
|
||||
}
|
16
Lab3CalebFontenot/src/main/java/Exercise01_06.java
Normal file
16
Lab3CalebFontenot/src/main/java/Exercise01_06.java
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* 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_06 {
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println(1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9);
|
||||
}
|
||||
}
|
16
Lab3CalebFontenot/src/main/java/Exercise01_07.java
Normal file
16
Lab3CalebFontenot/src/main/java/Exercise01_07.java
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* 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_07 {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
System.out.println(4 * (1.0 - (1.0/3) + (1.0/5) - (1.0/7) + (1.0/9) - (1.0/11)));
|
||||
System.out.println(4 * (1.0 - (1.0/3) + (1.0/5) - (1.0/7) + (1.0/9) - (1.0/11) + (1.0/13)));
|
||||
}
|
||||
}
|
25
Lab3CalebFontenot/src/main/java/Exercise01_11.java
Normal file
25
Lab3CalebFontenot/src/main/java/Exercise01_11.java
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Project/Maven2/JavaApp/src/main/java/${packagePath}/${mainClassName}.java to edit this template
|
||||
*/
|
||||
|
||||
package com.calebfontenot.lab3calebfontenot;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
public class Lab3CalebFontenot {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user