58bc23516c | ||
---|---|---|
.. | ||
readme.md |
readme.md
Lösung: Vararg-Methoden
def produkt(*p)
p.reduce { |s, e| s *= e }
end
puts produkt(5, 7, 8, 1)
58bc23516c | ||
---|---|---|
.. | ||
readme.md |
def produkt(*p)
p.reduce { |s, e| s *= e }
end
puts produkt(5, 7, 8, 1)