![]() |
TheAlgorithms/C++ 1.0.0
All the algorithms implemented in C++
|
A simple program to check if the given number is a factorial of some number or not. More...
#include <cassert>#include <cstdint>#include <iostream>Go to the source code of this file.
Namespaces | |
| namespace | math |
| for assert | |
Functions | |
| bool | math::is_factorial (uint64_t n) |
| Function to check if the given number is factorial of some number or not. | |
| static void | tests () |
| Self-test implementations. | |
| int | main () |
| Main function. | |
A simple program to check if the given number is a factorial of some number or not.
A factorial number is the sum of k! where any value of k is a positive integer. https://www.mathsisfun.com/numbers/factorial.html
Definition in file check_factorial.cpp.
| int main | ( | void | ) |
Main function.
Definition at line 71 of file check_factorial.cpp.
|
static |
Self-test implementations.
Definition at line 56 of file check_factorial.cpp.