Minimization of while loop in Armstrong Numbers#9976
Minimization of while loop in Armstrong Numbers#9976tianyizheng02 merged 2 commits intoTheAlgorithms:masterfrom
Conversation
The while loop is removed and simple length calculation is used so the task of minimization of while loop is achieved
for more information, see https://pre-commit.ci
Dwarkadhish2005
left a comment
There was a problem hiding this comment.
This code changes fixes all the problem explained that is the minimization of while loop by replacing it by length calculation in armstrong number and so it is all fit to pass review and merge.
Dwarkadhish2005
left a comment
There was a problem hiding this comment.
as the code is approved please merge it
|
the write access reviewer will merge it soon. |
|
@lohith-lalam This PR calculates the number of digits using |
|
i prefer my original changed code as it is simple to process and no unnecessary complications |
|
the reviewers have not yet merged my code ...please take this in consideration as soon as possible |
tianyizheng02
left a comment
There was a problem hiding this comment.
I prefer this over the log10 method because the latter can be incorrect if n is too large (due to the limitations of floating-point numbers)
The while loop is removed and simple length calculation is used so the task of minimization of while loop is achieved
Describe your change:
Checklist: