Java Problem 2-4 Pennies Problem

Problem 2-4. Pennies Problem. Here’s an old problem. Today, I’ll give you a penny. Tomorrow, I’ll give you two pennies. I’ll keep doubling the amount I’ll give you for 30 days. How much will you have at the end of the month (better use a long integer type to keep track)?

Solved
Show answers

Ask an AI advisor a question