Last Updated: 15 May, 2017

All prime numbers

Moderate
Asked in companies
Livekeeping (An IndiaMART Company)BarclaysMicrosoft

Problem statement

Given an integer N, print all the prime numbers that lie in the range 2 to N (both inclusive).

Print the prime numbers in different lines.

Input Format :
Integer N
Output Format :
Prime numbers in different lines
Constraints :
1 <= N <= 100