L
lalawawa
How do I turn the string "4.5" into the number 4.5 so I can do
arithmetic on it?
arithmetic on it?
lalawawa said:How do I turn the string "4.5" into the number 4.5 so I can do
arithmetic on it?
irb(main):017:0> "4.5".to_f
=> 4.5
--
Kind Regards,
Rajinder Yadav
http://DevMentor.org
Do Good! - Share Freely
irb(main):017:0> "4.5".to_f
=> 4.5
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.