// Program to test recursion program var fact = funct( n ) begin if n == 0 then return 1; else return n * fact( n - 1 ); end end, i; begin for i = 0; i < 10; i = i + 1 do print( i + " " ); println( fact( i ) ); end end.