how to initialize a variable to the type "double" in ruby -


like in c , c++

double x 

how in ruby ?

or in type float?

i want run

x=5/2 

then

x=2.5 

instead of

x=2 

if 1 operands float, result float too.

5 / 2.0 # => 2.5 

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -