I'm trying to write a program in C that will prompt the user for the number of days in a month, and then ask how many pennies they will receive on the first day. I then have to tell them how much money they will have received by the end of the month if every day the amount of pennies they first received doubles (so if they got 1 penny on the first day, then they'll get 2 on the second, 4 on the third, etc.)
I'm having trouble figuring out how to find the total amount of pennies they received in the month. I can write a program for what they will receive on the last day of the month, just not the total amount. Can someone direct me in the right direction?