Computer Science, asked by dasp8595, 9 months ago

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 pshalini615
4

Explanation:

40320...option d is correct

Answered by sarahssynergy
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