Question: in c code Write a program that calculates the factorial of a positive integer n. Recall n!= n.(n-1).(n-2).....3.2.1. Also, recall that 0! = 1 by
in c code
Write a program that calculates the factorial of a positive integer n. Recall n!= n.(n-1).(n-2).....3.2.1. Also, recall that 0! = 1 by definition. Sample Code Execution: Red text indicates information entered by the user Enter a positive integer : -8 Enter a positive integer : -234 Enter a positive integer : 0 O! = 1 Sample Code Execution: Red text indicates information entered by the user Enter a positive integer : 17 17! = 355687428096000 Sample Code Execution: Red text indicates information entered by the user Enter a positive integer : 6 6! = 720
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
