#Loan Repayments

1 messages · Page 1 of 1 (latest)

ancient pollen
#

Anyone have any ideas how to calculate how many months it would take for a loan to be repaid using iteration?

frigid stratusBOT
#

<@&987246399047479336> please have a look, thanks.

frigid stratusBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If your code is long, or you have multiple files to share, consider posting it on sites like https://pastebin.com/ and share the link instead, that is easier to browse for helpers.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

round shadow
lusty wraith
#

If you need to use iteration use a loop to either subtract the monthly payment from the total loan until it’s <= 0 or sum monthly payments until it is >= total loan. Either way, depending on the loop you use (while/do while), you may need to use a counter to determine how many iterations you’ve done

#

If using a for loop you can just use i

#

@ancient pollen