Hacker News new | past | comments | ask | show | jobs | submit login

    program xfact
      integer::i
      print *, fact ([(i, i = 0, 5)])
      
    contains
    elemental function fact (n)
          integer, intent (in)::n
          integer::i
        
          fact = product ([(i, i = 1, n)])
      end function fact
    end program xfact



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: