Skip to content

Calculate Nth prime, and store information in a file. The program will use the file for future calculations.

Notifications You must be signed in to change notification settings

framazan/NthPrimeNumber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nth Prime Number Calculation Program

Last updated on October 21, 2021
Authors: Idea from Dr. Kevin Brewer. Code by Filip S. Ramazan

How to run project:

To run the code, compile the .java file the IDE of your choice, and then run PrimeNumber class.
This project was made with BlueJ, and if you are using another IDE, delete all the files except
the .java file.

What this project does:

Basically, the program will ask the user for an integer, n. The program will calculate, as fast as possible, the nth prime. The program will intermittently give the user updates on how many primes were found. After program is done, it will write all the primes from 2 to the nth prime in a .txt file. This file will be read-only. After writing the text file, a .zip file will be compiled from the text file. The files are written in the program's path. After the first run of the program: the program will collect all the primes from the said created file, and use them to optimize performance, doing the same task as above. If more primes are calculated, then those will be written to the file too.

About

Calculate Nth prime, and store information in a file. The program will use the file for future calculations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages