My grandpa says he would rather have a penny that doublesevery day than a million dollars right now. I think he isnuts. Start with one penny on day 1, double it every day,and show me how much there is each day. Stop on the firstday it is a million dollars or more, and tell me which daythat was.Write your requirements list before you write any code. Input, calculate, output, and anything you had to decide for yourself.
while is for.double. Show it with :F2, the way Activity 1.9 did.Ctrl + C.Only one-star challenges have this section. If you already know how to begin, skip it — and when you move up to two stars, working out the order yourself is part of the job.
double for the money, starting at 0.01, and an int for the day, starting at 1.Day 1: $0.01Day 2: $0.02Day 3: $0.04Day 4: $0.08...Day 27: $671088.64Day 28: $1342177.28
A millionaire on day 28!Your program prints every day — the sample skips the middle to save space. Check the last day your program prints matches the day it announces, and compare the answer with the guess you wrote down. Would you take grandpa's deal?
Your requirements list, including your guess, and your program file, named cc-penny-doubling.