Write a script to calculate the factorial of a given number. Sample testcases Input 1 Output 1 2 Factorial of 2 is 2 Inp
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Write a script to calculate the factorial of a given number. Sample testcases Input 1 Output 1 2 Factorial of 2 is 2 Inp
Write a script to calculate the factorial of a given number. Sample testcases Input 1 Output 1 2 Factorial of 2 is 2 Input 2 Output 2 -1 No factorial for negative number Note: The program will not be evaluated if "Submit Code" is not done atleast once Extra spaces and new line characters in the program output will also result in the testcase failing