a = (rand(30) - 10) / 10.0 case a when 0..1 d = "in" else d = "out of" end printf "The number is %s the range 0 ¡å x ¡å 1.\n", d