variables - How to define procedures in Wolfram correctly? -


here algorithm finding trailing zeros in n!

  1. variables n = number , zeros = 0
  2. while n >= 1, do n = floor[n/5.] , zeros += n
  3. print out zeros

most doing wrong variables inside procedure, because line line code works !

output


Comments

Popular posts from this blog

angularjs - Showing an empty as first option in select tag -

qt - Change color of QGraphicsView rubber band -

c++ - Visible files in the "Projects" View of the Qt Creator IDE if using the CMake build system -