User Tools

Site Tools


prelude_one_to_carmichael_numbers_--_primality_testing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
prelude_one_to_carmichael_numbers_--_primality_testing [2011/09/25 06:06] – created jtkorbprelude_one_to_carmichael_numbers_--_primality_testing [2011/09/25 06:21] (current) jtkorb
Line 7: Line 7:
 ===== Input ===== ===== Input =====
  
-Input consists of a sequence of integers, one per line.  The last entry is a 0, which should not be processed.+Input consists of a sequence of integers, ''n'', 2 < ''n'' < 65000, one per line.  The last entry is a 0, which should not be processed.
  
 ===== Output ===== ===== Output =====
  
-For each non-zero input value, ''n'', determine whether ''n'' is prime, then print ''n'', a space, and either <tt>is prime</tt> or <tt>is not prime</tt>.+For each non-zero input value, ''n'', determine whether ''n'' is prime, then print ''n'', a space, and either <tt>is prime.</tt> or <tt>is not prime.</tt>.
  
 ===== Sample Input ===== ===== Sample Input =====
Line 17: Line 17:
 <code> <code>
 7 7
 +10
 0 0
 </code> </code>
Line 23: Line 24:
  
 <code> <code>
-16+7 is prime. 
 +10 is not prime.
 </code> </code>
prelude_one_to_carmichael_numbers_--_primality_testing.1316955963.txt.gz · Last modified: 2011/09/25 06:06 by jtkorb