shell program
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
Write a script to calculate the factorial of a given number. Sample testcases Input 1 Output 1 2 Factorial of 2 is 2 Inp
-
answerhappygod
- Site Admin
- Posts: 899604
- 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!