rubyx-debugger/codes/times.soml

24 lines
292 B
Plaintext
Raw Normal View History

2015-10-27 17:09:24 +01:00
class Object
int times(int a, int b)
if_zero( b )
a = 0
else
int m = b - 1
int t = times(a, m)
a = a + t
end
return a
end
int t_seven()
int tim = times(5,3)
tim.putint()
2015-10-27 19:08:23 +01:00
return tim
2015-10-27 17:09:24 +01:00
end
int main()
return t_seven()
end
end