.
Step 1: Input a positive integer A and let B = 1
Step 2: Let C = A/B. If C is an Integer print B
Step 3: If B otherwise go to step 4.
Step 4: Stop
.
Let's try this algorithm for A = 6