How to print prime numbers

help me in making code of prime number from 1 to n