From: Prateek Agarwal Date: 2009-07-28T02:01:47+09:00 Subject: Re: What is the power function Chris Dempsey wrote: > I think you're looking for: > > 2 ** 3 => 8 Thanks Chris. The following code is showing some error. Can you tell me what the problem is? def power(a,b) result=a**b result.to_i return result end puts "a=" a=gets a.to_i puts "b=" b=gets b.to_i c=power(a,b) puts "c=#{c}" -- Posted via http://www.ruby-forum.com/.