Write a pseudo-code to calculate the factorial of a given number.Example: factorial of 5 = 5*4*3*2*1 = 120.Note 1: factorial of 0 is 1.Note 2: you can drag and drop the required number of pseudo-code magnets into the pseudo-code box.
Answers
Answered by
13
Answer:
Factorial=1
input Number
if(Number==0) then
Factorial=1
else
while(Number!=0) do
Factorial=Factorial*Number
Number=Number-1
end-while
end-if
display Factorial
Similar questions
Hindi,
5 months ago
English,
5 months ago
Social Sciences,
11 months ago
Business Studies,
11 months ago
Biology,
1 year ago