def power(base, exp) if exp == 0 return 1 else return base*power(base, exp-1) end end puts "5^6= #{power(5,6)}"