pseudocode for calculating n factorial
Answers
Answered by
1
program factorial
F : integer --- factorial value
n : input number
k : local variable
F = 1
read n
k = n
while k > 0 do
begin
F = F * k
k = k - 1
end do
print "value of factorial of " , n , " is " , F
end program
F : integer --- factorial value
n : input number
k : local variable
F = 1
read n
k = n
while k > 0 do
begin
F = F * k
k = k - 1
end do
print "value of factorial of " , n , " is " , F
end program
Similar questions