Skip to content

Instantly share code, notes, and snippets.

View fitterfly-divyesh's full-sized avatar
🎯
Focusing

Divyesh Patel fitterfly-divyesh

🎯
Focusing
  • Fitterfly
View GitHub Profile
@costajob
costajob / fact.cr
Last active September 20, 2022 21:15
Factorial implementation using Big numbers in Ruby, GO and Crystal
require "big_int"
def fact(n)
return 1 if n == 0
n * fact(n - 1)
end
n = BigInt.new(ARGV[0])
puts fact(n)