2019-09-24 21:05:38 +02:00
|
|
|
class Integer < Data4
|
|
|
|
def <(right)
|
|
|
|
X.comparison(:<)
|
|
|
|
end
|
|
|
|
def +(right)
|
|
|
|
X.int_operator(:+)
|
|
|
|
end
|
|
|
|
end
|
2018-08-18 18:42:14 +02:00
|
|
|
class Space
|
|
|
|
def main(arg)
|
2019-07-25 20:25:15 +02:00
|
|
|
n = 6
|
2018-08-18 18:42:14 +02:00
|
|
|
a = 0
|
|
|
|
b = 1
|
|
|
|
i = 1
|
|
|
|
while( i < n )
|
|
|
|
result = a + b
|
|
|
|
a = b
|
|
|
|
b = result
|
|
|
|
i = i + 1
|
|
|
|
end
|
|
|
|
return result
|
|
|
|
end
|
2018-06-24 10:56:10 +02:00
|
|
|
end
|
2019-07-23 19:14:28 +02:00
|
|
|
#Space.new.main(1)
|