Subject: Re: What is the power function
From: Marc Heiler <shevegen linuxmail.org>
Date: Tue, 28 Jul 2009 06:25:52 +0900
References: 342573342574342575342578342583
In-reply-to: 342583
Prateek
def power(a,b)
result = (a ** b).to_i
end
puts power 2,4 # => "16"
These small snippets are best tried in irb.
You should use irb, really.
--
Posted via http://www.ruby-forum.com/.