https://github.com/1git2clone/citb106-f2024-project-2
University project mainly involving Mersenne numbers.
https://github.com/1git2clone/citb106-f2024-project-2
mersenne-numbers mersenne-prime perfect-number prime-numbers segmented-sieve sieve-of-eratosthenes trial-division
Last synced: 2 months ago
JSON representation
University project mainly involving Mersenne numbers.
- Host: GitHub
- URL: https://github.com/1git2clone/citb106-f2024-project-2
- Owner: 1Git2Clone
- License: mit
- Created: 2024-12-01T17:59:57.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-01-16T16:11:33.000Z (4 months ago)
- Last Synced: 2025-01-16T17:18:18.799Z (4 months ago)
- Topics: mersenne-numbers, mersenne-prime, perfect-number, prime-numbers, segmented-sieve, sieve-of-eratosthenes, trial-division
- Language: C++
- Homepage:
- Size: 83 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CITB106-F2024-Project-2
[![Build Icon]][Build Status] [![License Icon]][LICENSE]
[Build Icon]: https://img.shields.io/github/actions/workflow/status/1Git2Clone/CITB106-F2024-Project-2/cmake-linux.yml?branch=main
[Build Status]: https://github.com/1git2clone/CITB106-F2024-Project-2/actions?query=branch%3Amain
[License Icon]: https://img.shields.io/badge/license-MIT-blue.svg
[LICENSE]: LICENSEUniversity project mainly involving [Mersenne numbers](https://en.wikipedia.org/wiki/Mersenne_prime).
## Setting up
### Initial
> [!NOTE]
> This step needs to be done with every code change.```sh
cmake -B build
cmake --build build
```### Running main
```sh
./build/main
```Alternatively, if you want to pipe user input you can do it like so:
#### On Linux/Mac OS
```sh
./build/main < ./input/mock_input.txt
```#### On Windows
##### PowerShell
```powershell
Get-Content ./input/mock_input.txt | ./build/main
```##### CMD
```cmd
.\build\main < .\input\mock_input.txt
```### Running tests
```sh
./build/test/all_tests
ctest # This is an alternative but since this project uses gtest, the display
# of the tests will be worse.
```