Sie sind auf Seite 1von 1



Flow chart to find the given number is an Armstrong number or not? 1. start the program (Connector Symbol- Ovel Shape) 2. Get the input (a number) from the user (n) - (Input/Output Symbol-parallelogr am) 3. store the number in an int variable (m=n) 4. Initialize the sum as Zero (sum=0)-(Rectangle) 5. check the decision as while(n>0)-(Diamond Shape)conditional (or decision), re presented as a diamond (rhombus) 6.If this yields true then process as follows:(Processing Symbols-Rectangles) (remainder) r=n%10; sum=sum+(r*r*r); n=n/10; 7.check the decision statement again and continue with the process until the con dition becomes false. 8.Finally check m with sum 9. If the sum==m Then print the number is an Armstrong-(Output Symbol-parallelog ram) 10.Else not an Armstrong 11.Terminate the Program.(Ovel shape)