Skip to content

Instantly share code, notes, and snippets.

@pry0cc
Created April 28, 2016 22:41
Show Gist options
  • Save pry0cc/2d2d9690560249cc74b39164ac78c4ca to your computer and use it in GitHub Desktop.
Save pry0cc/2d2d9690560249cc74b39164ac78c4ca to your computer and use it in GitHub Desktop.
import java.util.Scanner;
public class JoshuaFlores_Exam4 {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
int day = 1;
int floor = 120;
int weeks = 7;
int roachsize = 3;
double formula = 0.53 * roachsize * 4;
double time = (0.53 * roachsize * 4)/(7);
while (day = 1; day * weeks; day++){
while(formula <= 120){
formula++;
}
}
System.out.println("A total of 4 cockaroaches will fully cover my apartment floors in weeks:" + time);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment