Q. SkillRack Problem Set1(Armstrong Number)

Q.Design an algorithm and draw a flow chart to check the given number is Armstrong number of three digits or not. A number is said to be armstrong if summation of cube of digits in a three digit number is equal to the number. Check for boundary conditions, if the value entered is outside boundary conditions then enter 'Invalid input'

Armstrong number.png

People might be confused how to raise the power to three as mentioned in the flowchart there are two ways to do it in python one way is to use ** which is used in python to raise something to a power and the other way is to use the pow() function.

Click on this to download the editable version of the flowchart and edit it using Yed editor

No comments:

Post a Comment

Bonus Practice Problems(GMT To IST)

IST (Indian Standard Time) is 5 hours 30 minutes ahead of GMT(Greenwich Mean Time). Develop an algorithm and write the Python code to find...