diff options
Diffstat (limited to 'sample/fact.rb')
-rw-r--r-- | sample/fact.rb | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/sample/fact.rb b/sample/fact.rb deleted file mode 100644 index 1462a6923a..0000000000 --- a/sample/fact.rb +++ /dev/null @@ -1,10 +0,0 @@ -def fact(n) - return 1 if n == 0 - f = 1 - while n>0 - f *= n - n -= 1 - end - return f -end -print fact(ARGV[0].to_i), "\n" |