C++ Prime Number Tester Programming Tutorial with Source Code

Channel:
Subscribers:
2,560
Published on ● Video Link: https://www.youtube.com/watch?v=0Cq0-LUz1VA



Category:
Tutorial
Duration: 22:51
95 views
4


Figured I would help out the peoples of the world with this lovely Prime Number Testing program I wrote in C++.

http://pastebin.com/v2zu0cyT source code

Basically uses a modulus operation to determine if there is a remainder. If no remainder, then the number is divisible by the number checked against. A loop runs testing every number below the user defined number "n". An array holds all values that are components of n - all numbers that divide n evenly (without remainder).
Caputre Software - OBS
Programming software - Microsoft Visual Studio







Tags:
c++
prime testing
primality
programming
tutorial
number theory
modulus
modulo