/* This program calculates the factorial of the number which is input */ begin read x; % input a number .. y:= 1; while x do begin y:= y * x; x:= x - 1; end; print y; end