Step 1 : Start
Step 2 : Read Number
Step 3 : i = 2 , Flag = 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 : Flag = 1 go to Step 10
Step 7 : i = i + 1 , then go to Step 4
Step 8 : if Flag = 1 then go to Step 10
else go to Step 9
Step 9 : print "Number is Prime" ,go to Step 11
Step 10 : print "Number is not Prime" ,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 : Flag = 1 go to Step 10
Step 7 : i = i + 1 , then go to Step 4
Step 8 : if Flag = 1 then go to Step 10
else go to Step 9
Step 9 : print "Number is Prime" ,go to Step 11
Step 10 : print "Number is not Prime" ,go to Step 11
Step 11 : Stop
No comments:
Post a Comment