FACTORIAL
CodeChefOpen on judge ↗
In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. For example, 5 => 5* 4* 3* 2* 1 = 120. 5!=5\times 4\times 3\times 2\times 1=120.\ Write a program to calculate the factorial of a given number. Input The input to the program will be a positive integer Output The output would be the factorial of
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start