7) The input N from the user is 8. The output of the following algorithm is
a) 120
b) 720
c) 5040
d) 40320
Attachments:
Answers
Answered by
4
Explanation:
40320...option d is correct
Answered by
0
Option C) 5040
Explanation:
- The following sequence chart represents an algorithm that finds out the factorial of n-1. where n is the integer input taken from the user.
- Output = (n-1)!
while(i < n)
{
i=i+1;
x=x*i;
}
- Here, n = 8. So the output of the algorithm will be (8-1)! =7! = 5040.
Similar questions