diff options
author | Braxton Hall | 2022-10-27 20:54:47 +0000 |
---|---|---|
committer | GitHub | 2022-10-27 20:54:47 +0000 |
commit | 2b18baac0e3cf71859650e81edec99bbe02a7a66 (patch) | |
tree | d36a6b9387d69a49f57087532a0192ec6356b84c | |
parent | 0c3a8d355afe70a3ba593fc3f1ead665abf5bb09 (diff) | |
parent | 3d3a66b5b4c23c5acd1dbde12957191e224849b1 (diff) |
Merge pull request #58 from komodoooo/main
fibonacci in ruby and crystal
-rw-r--r-- | entries/komodoooo/fib.cr | 9 | ||||
-rw-r--r-- | entries/komodoooo/fib.rb | 9 | ||||
-rw-r--r-- | people.json | 11 |
3 files changed, 29 insertions, 0 deletions
diff --git a/entries/komodoooo/fib.cr b/entries/komodoooo/fib.cr new file mode 100644 index 0000000..f15ca3b --- /dev/null +++ b/entries/komodoooo/fib.cr @@ -0,0 +1,9 @@ +def fibonacci(n) + a,b=0,1 + while a < n + puts "#{a} " + a,b=b,a+b + end +end +print "Number: " +fibonacci(gets.not_nil!.to_i) diff --git a/entries/komodoooo/fib.rb b/entries/komodoooo/fib.rb new file mode 100644 index 0000000..ce25eeb --- /dev/null +++ b/entries/komodoooo/fib.rb @@ -0,0 +1,9 @@ +def fibonacci(n) + a,b=0,1 + while a<n + puts"#{a} " + a,b=b,a+b + end +end +print"Number: " +fibonacci(gets.chomp.to_i) diff --git a/people.json b/people.json index a6ef1d5..5b9eb1e 100644 --- a/people.json +++ b/people.json @@ -491,6 +491,17 @@ ] }, { + "github": "komodoooo", + "name": "Sesso Pazzo", + "title": "sus", + "entries": [ + { + "name": "rb-cr fibonacci", + "link": "./entries/komodoooo/" + } + ] + }, + { "github": "kekerr", "name": "Katharine Kerr", "title": "'Whether you think you can or can't, either way you are right.' - Henry Ford", |