Please review the code, I would like feedback on approach and whether a loop is a good idea. Moreover, how formatting can be improved? Thank you.
Be the first feedback