Step 1 : Start
Step 2 : Read Number
Step 3 : i = 1 ,Sum = 0
Step 4 : if i <= Number / 2 then go to Step 5
else go to Step 8
Step 5 : if Number % i = 0 then go to Step 6
else go to Step 7
Step 6 : Sum = Sum + i
Step 7 : i = i + 1 , then go to Step 4
Step 8 : if Sum = Number then go to Step 9
else go to Step 10
Step 9 : print "Number is Perfect" ,go to Step 11
Step 10 : print "Number is not Perfect" ,go to Step 11
Step 11 : Stop
else go to Step 8
Step 5 : if Number % i = 0 then go to Step 6
else go to Step 7
Step 6 : Sum = Sum + i
Step 7 : i = i + 1 , then go to Step 4
Step 8 : if Sum = Number then go to Step 9
else go to Step 10
Step 9 : print "Number is Perfect" ,go to Step 11
Step 10 : print "Number is not Perfect" ,go to Step 11
Step 11 : Stop
No comments:
Post a Comment