/* determine factorial of a number */ x = 1 /* x will be incremented in loop */ i = 1 say "Do you want to know the factorial of a number?" say "Then enter your number:" parse pull num /* wait for input */ if num < 0 then do say "There are no factorials for negative numbers!" exit /* exit programm if num < 0 */ end else do until x > num i = i * x /* multiply i with current x */ x = x + 1 /* increment x until x = num */ end say num ||"! is" i"."