Or login with:
| boolisPrime( | int | n | ) |
#include <iostream> #include <codecogs/maths/discrete/number_theory/is_prime.h> int main(int argc, char **argv) { for(unsigned int i = 2; i < UINT_MAX; i++) { if(isPrime(i)) std::cout << i << std::endl; } return 0; }Output
2, 3, 5, 7, 11, 13, .......... until UINT_MAX!
| n | Input number |
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
You must login to leave a messge