integer function ifact(l) ifact=1 do j=1,l ifact=ifact*j enddo return end