rubyx/test/mains/source/fibo__8.rb
Torsten Ruger 80264c5322 mains tests can include any code
not wrapping as main anymore
(must still include mains)
first part of #11
2018-08-18 19:42:14 +03:00

16 lines
189 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