Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions FindingPrimes.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
/**
* The Sieve of Eratosthenes is an algorithm use to find prime numbers,
* up to a given value.
* Illustration: https://upload.wikimedia.org/wikipedia/commons/b/b9/Sieve_of_Eratosthenes_animation.gif
* (This illustration is also in the github repository)
*
* @author Unknown
*
*/
import java.util.Scanner;

public class FindingPrimes{
/**
* The Main method
*
* @param args Command line arguments
*/
public static void main(String args[]){
SOE(20); //Example: Finds all the primes up to 20
Scanner entry = new Scanner(System.in);
System.out.println("Up to wich number do you want to see the primes?:");
int n = entry.nextInt();
SOE(n); //Example: Finds all the primes up to 20
}

/**
Expand Down