I have some problem when i want start program. What should I do to fix
this problem?
D:/2.rb:7: parse error, unexpected kEND, expecting $
r=10
R=20
h=30
def my_l = l(h, R, r)
Math.sqrt(h**2+(R-r)**2)
end # <= Here problem
def my_s = s(l, R, r)
Math::PI*3(R+r)+Math::PI(R**2+r**2)
end
def my_v = v(h, r, R)
Math::PI*h/3(R**2+r**2+R*r))
end
puts l(10, 20, 30)
puts v(30, 10, 20)
puts s(my_l, 20, 10)
···
--
Posted via http://www.ruby-forum.com/.