Write a Pseudocode function that returns the factorial of an integer input.

--------------------------------------INPUT XY = 1
WHILE ( X > 1) Y = X * Y X = X - 1
OUTPUT Y-------------------------------It is also possible to complete this task using recursion
DEF fact(n):  IF (n > 1):    RETURN (n*fact(n-1))  ELSE    RETURN 1

Related Computing A Level answers

All answers ▸

Write a small program, in pseudocode or otherwise, that demonstrates a recursive algorithm. Write a small explanation of how recursion is used in your program.


Given an ordered array of integers "V" and a integer "Sum", write a function that would return "true" if it finds two numbers in V that add up to Sum, and "false" otherwise.


What is an interface and why are they useful?


What is the difference between simplex, half duplex and full duplex?