rubyx/test/mains/source/fibo__8.rb
Torsten 95af84e752 fixing test to pass
and extract own kind of same tests to bench
bench tests will need some loop, but not as large as c
2019-07-25 21:25:15 +03:00

17 lines
208 B
Ruby

class Space
def main(arg)
n = 6
a = 0
b = 1
i = 1
while( i < n )
result = a + b
a = b
b = result
i = i + 1
end
return result
end
end
#Space.new.main(1)