Question: Write findGrowth ( ) ' s recursive case to recursively call findGrowth ( ) with day + 1 and total multiplied by 2 . Ex:

Write findGrowth()'s recursive case to recursively call findGrowth() with day +1 and total multiplied by 2.
Ex: If the input is 500, then the output is:
day: 1, total: 500
day: 2, total: 1000
day: 3, total: 2000
day: 4, total: 4000
Bacteria population is at least 4000 on day 4.
Note: Assume input is non-negative.
import java.util.Scanner;
public class GrowthData {
public static void findGrowth(int day, int total){
System.out.println("day: "+ day +", total: "+ total);
if (total 4900{
}
System.out.print ("Bacteria population is at least 4000 on day "+ day +".");
Y** Your code goes here %
}
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
int total;
 Write findGrowth()'s recursive case to recursively call findGrowth() with day +1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!