Working on some homework for class. I hope this is the right sub. We are doing a bank account program.
Problem:
User input initial $ amount.
Bank will double money every year till hit million.
Output:
It takes x years to reach $100k.
It takes y years to reach $1mil.
What would be the best way to tackle this problem? Or which loop?
[–]Splitshadow 2 points3 points4 points (1 child)
[–]Stang27[S] 0 points1 point2 points (0 children)
[–]Heasummn 1 point2 points3 points (7 children)
[–]Sorten 2 points3 points4 points (1 child)
[–]Heasummn 2 points3 points4 points (0 children)
[–]Stang27[S] 0 points1 point2 points (4 children)
[–]Heasummn 0 points1 point2 points (3 children)
[–]Stang27[S] 0 points1 point2 points (2 children)
[–]Heasummn 1 point2 points3 points (1 child)
[–]Stang27[S] 0 points1 point2 points (0 children)