I am given this starter code and I am suppose to debug it and all of...

70.2K

Verified Solution

Question

Programming

I am given this starter code and I am suppose to debug it andall of that and it will not work after I change \">\" to \"<=\"and then i'm not sure after that what else I have to do. Couldsomeone help me solve this?

// Start with a penny
// double it every day
// how much do you have in a 30-day month?
public class DebugSix1
{
   public static void main(String args[])
   {
      final int DAYS = 30;
      double money = 0.01;
      int day = 1;
      while(day > DAYS);
      {
         money = 2 *money;
         ++days;
        System.out.println(\"After day \" + day +
           \" you have \" + moneyAmt);
      }
   }
}

That is the starter code. This is with the Java Programming 9thedition by Joyce Farrel and the other tutorials i have found do notshow it with this starter code so I am confused.

Answer & Explanation Solved by verified expert
3.9 Ratings (483 Votes)
Start with a penny double it every    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students