Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
Prime factorization of positive integers. More...
#include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
Functions | |
void | SieveOfEratosthenes (int N) |
void | prime_factorization (int num) |
int | main () |
Variables | |
bool | isprime [1000006] |
std::vector< int > | prime_numbers |
std::vector< std::pair< int, int > > | factors |
Prime factorization of positive integers.
int main | ( | void | ) |
Main program
void prime_factorization | ( | int | num | ) |
Prime factorization of a number
void SieveOfEratosthenes | ( | int | N | ) |
Calculating prime number upto a given range
std::vector<std::pair<int, int> > factors |
list of prime factor-pairs
bool isprime[1000006] |
Declaring variables for maintaing prime numbers and to check whether a number is prime or not
std::vector<int> prime_numbers |
list of prime numbers