This question was asked in Prime Numbers from 1 to 100

How to do

Shanthi Amulya's image