2019-09-24 22:05:38 +03:00
|
|
|
class Integer < Data4
|
|
|
|
def <(right)
|
|
|
|
X.comparison(:<)
|
|
|
|
end
|
|
|
|
def +(right)
|
|
|
|
X.int_operator(:+)
|
|
|
|
end
|
|
|
|
end
|
2018-08-18 19:42:14 +03:00
|
|
|
class Space
|
|
|
|
def main(arg)
|
2019-07-25 21:25:15 +03:00
|
|
|
n = 6
|
2018-08-18 19:42:14 +03: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 11:56:10 +03:00
|
|
|
end
|
2019-07-23 20:14:28 +03:00
|
|
|
#Space.new.main(1)
|