Loading...
Searching...
No Matches
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.
namespace math for assertA 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.
◆ main()Main function.
Definition at line 71 of file check_factorial.cpp.
71 {
73 return 0;
74}
static void tests()
Self-test implementations.
◆ tests()Self-test implementations.
Definition at line 56 of file check_factorial.cpp.
56 {
63
64 std::cout << "All tests have successfully passed!" << std::endl;
65}
bool is_factorial(uint64_t n)
Function to check if the given number is factorial of some number or not.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4