//This code computes the factorial of x //-------------------------- //the parameter of the code //it must be positive x = 10; //----------------- //the actual code result = 1; i = 1; //compute the factorial while i <= x do result = result * i; i = i + 1; endwhile //print the result print "The factorial of "; print x; print " is: "; print result; print newline;