Bluebook
Ten Primes on a Line
A natural number N (greater than one), is a prime number if it has no natural number divisors other than 1 and N. Given an integer M, write a program that finds the first M primes, printing them ten to a line. Each number should be separated by a space.
Sample Input
5
Sample Output
2 3 5 7 11
All Submissions
Best Solutions
Point Value: 5
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 27, 2008
Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3
Comments (Search)
https://en.wikipedia.org/wiki/Primality_test