Hello, my homework for computer class says
"• In a biology experiment, Cory finds that a sample of
microorganisms doubles in population every 12 hours. He
wants to know how many hours it will take to reach a
certain microorganism population level if he starts with
1000 organisms each time.
• WAM (write a method) to receive an integer N representing a desired
organism population level, and determine how many
hours it will be until the population level reaches N or
more organisms."
I can't seem to figure this out at all, the code I have so far reads as follows:
public static int (int X, int Y) {
int size = X;
int hours = 0;
while (size<=Y) {
size * 2;
}
}