Divisors


Print all the divisors of a number

Preview of this algorithm

Icon Variable
Ask for a with default 10
Icon Variable
Set b to 1
Icon List
Create list d
Icon Structure
While b <= a
Icon Structure
If a % b = 0
Icon List
Add b to d
Icon Structure
Else
Icon Structure
End
Icon Variable
Set b to b + 1
Icon Structure
End
Icon Output
Print variable d