diff --git a/math/factorial.cpp b/math/factorial.cpp index 8b13eb52d..353f0b16b 100644 --- a/math/factorial.cpp +++ b/math/factorial.cpp @@ -1,14 +1,17 @@ -// C++ program to find factorial of given number -#include +/** + * @file + * @brief C++ program to find factorial of given number + */ +#include -// function to find factorial of given number +/** function to find factorial of given number */ unsigned int factorial(unsigned int n) { if (n == 0) return 1; return n * factorial(n - 1); } -// Driver code +/** Main function */ int main() { int num = 5; std::cout << "Factorial of " << num << " is " << factorial(num)