220k views
3 votes
Write a script called fact.sh that is located in your workspace directory to calculate the factorial of a number n; where n is a non-negative integer between 1 and 20 that is passed as a parameter from the command line (e.g. ./fact.sh 5). The result should be echoed to the screen as a single integer (e.g. 120).

NOTE: Do not include any other output, just output the single integer result.
Submit your code to the auto-grader by pressing Check-It!
NOTE: You can submit as many times as you want up until the due date.

User E LaRoche
by
6.7k points

1 Answer

2 votes

Answer:

hope this helps

Step-by-step explanation:

Write a script called fact.sh that is located in your workspace directory to calculate-example-1
User Tituszban
by
6.3k points