Repository: TheAlgorithms/C-Plus-Plus
File: math/check_prime.cpp (C++)

Code before:
/**
 * @file
 * @brief
 * A simple program to check if the given number is a prime or not.
 * https://en.wikipedia.org/wiki/Primality_test
 * @details
 * A prime number is any number that can be divided only by itself and 1. It must
 * be positive and a whole number, therefore any prime number is part of the
 * set of natural numbers. The majority of prime numbers are even numbers, with
 * the exception of 2. This algorithm finds prime numbers using this information.
 * additional ways to solve the prime check problem:
 * https://cp-algorithms.com/algebra/primality_tests.html#practice-problems
 * @author [Omkar Langhe](https://github.com/omkarlanghe)
 */

#include <cassert>   /// for assert
#include <iostream>  /// for IO operations

/**
 * @brief Mathematical algorithms
 * @namespace
 */
namespace math {
    /**
     * @brief Function to check if the given number is prime or not.
     * @param num number to be checked.
     * @return true if number is a prime
     * @return false if number is not a prime.
     */
    bool is_prime(long long num) {
        /*!
         * Reduce all possibilities of a number which cannot be prime with the first
         * 3 if, else if conditionals. Example: Since no even number, except 2 can
         * be a prime number and the next prime we find after our checks is 5,
         * we will start the for loop with i = 5. then for each loop we increment
         * i by +6 and check if i or i+2 is a factor of the number; if it's a factor
         * then we will return false. otherwise, true will be returned after the

Review comment (security):
You can also add yourself as you helped to follow the latest guidelines. 🙂
```suggestion
 * @author [Omkar Langhe](https://github.com/omkarlanghe)
 * @author [ewd00010](https://github.com/ewd00010)
```


Code after:
/**
 * @file
 * @brief
 * A simple program to check if the given number is [Prime](https://en.wikipedia.org/wiki/Primality_test) or not.
 * @details
 * A prime number is any number that can be divided only by itself and 1. It must
 * be positive and a whole number, therefore any prime number is part of the
 * set of natural numbers. The majority of prime numbers are even numbers, with
 * the exception of 2. This algorithm finds prime numbers using this information.
 * additional ways to solve the prime check problem:
 * https://cp-algorithms.com/algebra/primality_tests.html#practice-problems
 * @author [Omkar Langhe](https://github.com/omkarlanghe)
 * @author [ewd00010](https://github.com/ewd00010)
 */

#include <cassert>   /// for assert
#include <iostream>  /// for IO operations

/**
 * @brief Mathematical algorithms
 * @namespace
 */
namespace math {
    /**
     * @brief Function to check if the given number is prime or not.
     * @param num number to be checked.
     * @return true if number is a prime
     * @return false if number is not a prime.
     */
    bool is_prime(int64_t num) {
        /*!
         * Reduce all possibilities of a number which cannot be prime with the first
         * 3 if, else if conditionals. Example: Since no even number, except 2 can
         * be a prime number and the next prime we find after our checks is 5,
         * we will start the for loop with i = 5. then for each loop we increment
         * i by +6 and check if i or i+2 is a factor of the number; if it's a factor
         * then we will return false. otherwise, true will be returned after the