Share your repls and programming experiences

← Back to all posts
6.2. While: Least divisor
pole55

"Given an integer not less than 2. Print its smallest integer divisor greater than 1."

Example input
15

Example output
3

Voters
Dev85
LucasMartins42
stu1081148
stu1081140
msayda01
Ematrone
YvetteAlvarez
KatiRupp
BowangJ
DillonP05
Comments
hotnewtop
NathanMulate

Can you do this in a while loop?