Difference between revisions of "Computing Prime Numbers"

From CompSciWiki
Jump to: navigation, search
Line 1: Line 1:
 
{{1010PrAD|ProblemName=Computing Prime Numbers
 
{{1010PrAD|ProblemName=Computing Prime Numbers
  
|Problem= The problem
+
|Problem= It is often useful to compute prime numbers (e.g. Encryption).  Compute prime numbers up to 20 by use of nested loops.
  
  
Line 11: Line 11:
 
An image or By Students section
 
An image or By Students section
  
|Solution=The solution...
+
|Solution=To solve this problem you need to think of solving for each individual number; one at a time.
  
 
}}
 
}}

Revision as of 12:16, 1 April 2010

Back to the Program-A-Day homepage

Problem

It is often useful to compute prime numbers (e.g. Encryption). Compute prime numbers up to 20 by use of nested loops.

 

SideSectionTitle

float
Taken from http://www.flickr.com/photos/daniello/565304023/

An image or By Students section

Solution

To solve this problem you need to think of solving for each individual number; one at a time.

Code

SolutionCode goes here. Please DO NOT put your code in <pre> tags!

Back to the Program-A-Day homepage