Share your repls and programming experiences

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

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

Example input
15

Example output
3

Comments
hotnewtop
NathanMulate (5)

Can you do this in a while loop?