A strong number, also known as a factorial number, is a special integer where the sum of the factorials of its individual digits equals the original number itself. In other words, if you take each digit of the number, compute its factorial (e.g., 5! = 120), and sum up these factorials, the result should match the original number.
Welcome, developer! Your task is to write the logic of isStrongNumber method for verifying whether a number is strong or not. A strong number, as defined above, has the fascinating property that the sum of the factorials of its individual digits equals the original number itself. So, let’s dive into completing the function
Task for students
Must to have
complete a method named isStrongNumber.
Button contains text ‘Generate Pattern’ (case-insensitive) and must have id as ‘btn’ and type as ‘submit’.
Functionality tested
method should verify the input number, whether is strong or not. also display the result in the element having id 'result'.
when number is strong result displays 'Yes indeed a Strong Number', if not then 'Not a Strong Number'
UI reference
Use the given provided code and try to mirror the UI.
Evaluation
After submission, your solution will be evaluated automatically based on the tasks defined above.
Upon successful completion of all the tasks/requirements, you will get a full score, and there will not be any partial scoring.
You can work on your failed test cases & resubmit your solution.
Your problem will get evaluated instantly.
Do’s & don’t
Use the given code structure in editor and do not make any changes.
Do not modify existing classes or tags.
Focus on correct HTML structure and class names.
Query & feedback
In case of any query/feedback on this project, please fill this form & we will soon get in touch with you to resolve.