11182 - primes   

Description

Given a integer number N, print out all the primes less than N

In this problem, your ONLY need to implement a function called isPrime(int n).

It returns 1 if the number is prime, otherwise returns 0.

Main program is below. It calls the function you implement and print out the results.

 

Input

There is only a integer N. (N<=1000)

Output

All the primes less than N in ascending order, each prime a line.

Sample Input  Download

Sample Output  Download

Partial Judge Code

11182.cpp

Partial Judge Header

11182.h

Tags




Discuss