Monday, February 6, 2017

Algorithm

This algorithm is very important to the program because this is what is getting the input from the users and asking how many days are in the month. Then asking for the pennies on the first day using this info the while loop will then get those pennies and multiply by 2 each time for that amount of days. Later this is converted into dollars but this algorithm is the main part of the program that lets the user input and calculate for them. The purpose of this was from the course we took last year where this was one of the problems we had to figure out how much money would the user have if the pennies multiplied by 2 every day from the original amount.

No comments:

Post a Comment