On 2013-06-23, at 2:51 PM, "Michael P F." <lists / ruby-forum.com> wrote:

> I want to input the variable, which changes, from the console and=20
> evaluate multiple examples without entering the constant multiple =
times.
>=20
> --=20
> Posted via http://www.ruby-forum.com/.

Do yo mean something like this (which uses the highline gem to prompt =
for input and coerce it to the right  type):

#!/usr/bin/env ruby

require 'rubygems'
require 'highline/import'

CONST =3D 28977682.9

begin
  loop do
    num =3D ask("Enter number: ", Float)
    puts CONST * num
  end
rescue EOFError
  puts "Bye!"
end

__END__

Hope this helps,

Mike


--=20

Mike Stok <mike / stok.ca>
http://www.stok.ca/~mike/

The "`Stok' disclaimers" apply.