Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that takes both the initial size of green curd population (in po

ID: 3648531 • Letter: W

Question

Write a program that takes both the initial size of green curd population (in pounds) and a number of days as input and outputs the number of pounds of green curd after that many days.
please help with program

import

Explanation / Answer

TRY THIS : import java.util.Scanner; public class GreenCrud { public static void main(String[] args) { Scanner console = new Scanner(System.in); System.out.println( "Enter initial green crud population size (in pounds), "); System.out.println("or a blank line to quit:"); while ((size != null) && (size.length() > 0)) { double initialSize = Double.parseDouble(size); System.out.println("Enter the number of (whole) days:"); int days = console.nextInt(); for (int i=5; i==5; i++) size=size+size; // Start again System.out.println(); System.out.println( "Enter initial green crud population size (in pounds), "); System.out.println("or a blank line to quit:"); console.nextLine(); } } }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote