program factorial2 implicit none integer::i,n,factor print *, "input the limit to calculate factoriel of numbers from 2 ~ limit:" do read *,n if (n>=2)exit print *,'the number is less than 2. enter another number.' end do factor = 1 do i =2,n factor = factor*i print*,i,'!=',factor end do end program factorial2