Problem Set 1: Paying off Credit Card Debt: Problem #2 I could be wrong (at this point, possibly very, very wrong) but I feel it's necessary to have a loop nested inside of another loop in order to answer this question. The first loop for setting up the min monthly pay to increment up and the second for decrementing down the months. I'm at this point not even sure if this is the case. Though if it is I have no idea how to attach the "Updated balance each month = Previous balance*(1+ monthly interest rate)-Minimum monthly payment" to the monthly loop in order to get it to (post 1 of 2)
(post 2 of 2) cycle through the each month while updating the previous balance. Then if 0 is not reached for it to break out of the nested loop, add an additional 10, and then cycle through again. I know that's sort of the whole algorithm but it is what it is. I can post attempts if it would be helpful
did you have a question?
Ya I actually figured it out but I agree that this was sort of a poorly formed question. I guess I was trying to find out 1. if I was taking the right approach. If I was on the right track I was going to 2. have someone look at my code and maybe give me some insight into where I was going wrong. Or 3. help me figure out what was wrong with my approach.
Join our real-time social learning platform and learn together with your friends!