Due to wrong (and mere) implementation of the algorithm, it did what it should, yes; but it didn't do the way as it should be. You can go to an update version (where the alogrithm equals the here.
This is a very basic and small console-application. It prints out all prime numbers until the user-specified range and starts at counting (logically) at 2. This was created for my computer science class Java OOP1. Same as DebtCalculator.
- Download the JAR at the top of this repository
- Execute the command:
java -jar SieveOfErastosthenes.jar <int: maxRange>
- E.g. for all prime numbers between 2-100, you do the following command:
java -jar SieveOfErastosthenes.jar 100